<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Dev411 Blog: Category perl</title>
    <link>http://www.dev411.com/blog/tag/perl</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>John Wang on Technology</description>
    <item>
      <title>Comparing CPAN Modules with YUI DataTable</title>
      <description>&lt;p&gt;There is a lot of choice on the CPAN for open source Perl libraries and sometimes it's difficult to get an idea of how modules compare to each other. &lt;a href="http://ratings.cpan.org"&gt;CPAN Ratings&lt;/a&gt; is a good source of reviews but it's not convenient to compare one module with another. To provide a partial solution, I whipped up a quick &lt;a href="http://www.dev411.com/perl/cpancompare"&gt;CPAN Compare&lt;/a&gt; page which will pull the CPAN Ratings from a number of modules and summarize them for you.&lt;/p&gt;

&lt;div style="text-align:center;margin:1em 0 1em 0"&gt;&lt;a href="/perl/cpancompare/"&gt;&lt;img alt="CPAN Compare Modules" src="/images/articles/cpan_compare_ss_400x.png" style="border:0" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;I decided to use &lt;a href="http://developer.yahoo.com/yui/datatable/"&gt;YUI DataTable&lt;/a&gt; for this. I've heard good things about YUI so I decided to give it a try. Getting the example code to work off of the Yahoo website almost as straight forward as say using Scriptaculous demos but it was faster than working with Dojo in the early days. The nice thing about the DataTable is that it takes a JavaScript array which can be populated using server-side JSON generated code. I used JSON::XS for this.&lt;/p&gt;

&lt;p&gt;YUI DataTable has a nice sorting feature and it can sort on text, numbers, dates, etc. However, it does not seem to be able to sort on visual information only so if you include HTML markup, that will be used for sorting as well. To get around this I used standard text sorting and customized the title fields to assist in the sorting. For example, in a link, I start with &amp;lt;a title=" instead of &amp;lt;a href=" because title is arbitrary and can be used to mirror the InnerHTML. For numbers a text sort will have 25 come before 4 so I added leading zeros to numbers using sprintf and put them in the title attribute as well.&lt;/p&gt;

&lt;p&gt;A few Perl modules and the Logo Creator website made this easy to set up. YUI DataTable has a nice default CSS so I just left that as is.&lt;/p&gt;

&lt;p&gt;Note: YUI DataTable is convenient if you just drop in a Perl data structure and have it generate the HTML and JS for you. This script uses 3 DataTables (ratings, popular and recent) so I wrote a Perl wrapper for YUI which takes a hashref and generates the client code, extracting the fields from the column definitions. This works because YUI does not require the HTML table to be built beforehand. By not having an underlying table, it's faster to get running but also won't fallback as nicely for people who aren't running JS (8% of users?). As an alternative, jQuery has a &lt;a href="ttp://ideamill.synaptrixgroup.com/jquery/tablefilter/tabletest.htm"&gt;couple&lt;/a&gt; of &lt;a href="http://tablesorter.com/docs/#Demo"&gt;add ons&lt;/a&gt; which work by enhancing an existing HTML table. jQuery has some nice syntax but I haven't gotten around to using it yet. Perhaps it's worth a look.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Nov 2007 00:09:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:ae818063-2322-4837-b2a9-4bed5ff26768</guid>
      <author>John Wang</author>
      <link>http://www.dev411.com/blog/2007/11/09/comparing-cpan-modules-with-yui-datatable</link>
      <category>yui</category>
      <category>perl</category>
    </item>
    <item>
      <title>Database Abstraction - code vs infrastructure</title>
      <description>&lt;p&gt;I've worked on a number of database-driven projects and no matter how much people want database abstraction, it was always difficult to code and maintain. I was recently reminded of this when I read this &lt;a href="http://www.drupal4hu.com/node/64" title="My stance on database abstraction"&gt;Drupal article on dropping PostgreSQL support&lt;/a&gt;. Not only can it be difficult to maintain support for multiple databases, but it may be difficult to find developers.&lt;/p&gt;

&lt;p&gt;One solution of modern programming is to move database abstraction from the code to the infrastructure using a ORM (Object-Relational Mapper) or Data Mapper. A ORM and Data Mapper abstracts the database for you so you no longer have to do tie db abstraction to each app. Not only does it let you code once for multiple databases it lets your users migrate their data from one database to another. This blog runs Typo which is based on Ruby on Rails and ActiveRecord. I've been contemplating migrating Typo from MySQL to PostgreSQL and I've been told that it would be as simple as exporting the data with YAML, updating the database.yml file and importing the data. I haven't gotten around to doing it yet but it is a powerful idea. ActiveRecord is a data mapper and isn't as flexible as a full blown ORM but it gets the job done for the most part. For a full-blown ORM, I think of Perl's DBIx::Class which provides a full OO interface to the RDBMS allowing you to code just once for multiple DBs without limiting you when you want to use some esoteric database-specific SQL. DBIx::Class is often used with the Catalyst Framework but is also used by itself.&lt;/p&gt;

&lt;p&gt;There are PHP frameworks out there like Symfony and Cake but do any of them have stand-alone ORMs? If so, could Drupal move to something like that and solve their maintainership problems once and for all? Drupal is part of the &lt;a href="http://gophp5.org"&gt;Go PHP5&lt;/a&gt; effort so there should be no issue using PHP 5 OO. Something to think about for the Drupal folks if a PHP ORM is available.&lt;/p&gt;

</description>
      <pubDate>Tue, 04 Sep 2007 23:38:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:fd57e1bd-e67a-47e8-96e7-2cffbf7b196a</guid>
      <author>John Wang</author>
      <link>http://www.dev411.com/blog/2007/09/04/database-abstraction-code-vs-infrastructure</link>
      <category>postgresql</category>
      <category>catalyst</category>
      <category>activerecord</category>
      <category>perl</category>
      <category>mysql</category>
      <category>typo</category>
      <category>php</category>
    </item>
    <item>
      <title>Perl, MySQL and UTF-8</title>
      <description>&lt;p&gt;One of the mysteries of Perl to me is that why, as of yet, is there no UTF-8 support in DBD::mysql although this issue has been discussed on the msql-mysql-modules list since at least 2003 (using the MARC archives). This is also given that MySQL does have UTF-8 support itself.&lt;/p&gt;

&lt;p&gt;When I first looked into this I found a few articles on this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.simplicidade.org/notes/archives/2005/12/utf8_and_dbdmys.html"&gt;utf-8 and DBD::mysql by Pedro Melo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.zackvision.com/weblog/2005/11/mt-unicode-mysql.html"&gt;Movable Type, MySQL, Perl, Unicode by Zakaria "Zack" Ajmal: provides a patch for Movable Type 3.2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pedro's article mentions that the reason this hasn't been done for DBD::mysql is that the DBI and DBD::mysql folks cannot decide where to put UTF-8 implementation, i.e. in DBI itself or the DBD drivers. Because, there is still no built-in support. To get around this, there have been numerous patches produced. Andrew Forrest even put together UTF-8 versions of DBI and CGI.pm (link seems broken atm). However, some of these patches seem to have problems and are non-standard.&lt;/p&gt;

&lt;p&gt;If you prefer to use an ORM, DBIx::Class and Class::DBI get around this by implementing UTF-8 support in their own libraries with DBIx::Class::UTF8Columns and Class::DBI::utf8 respectively. I'd recommend DBIx::Class over Class::DBI since it has more functionality (e.g. built-in JOIN support) and is supposed to generate more efficient SQL.&lt;/p&gt;

&lt;p&gt;The intersting thing is that DBD::Pg for PostgreSQL has had built-in UTF-8 support for some time. While not an issue specific to the MySQL database, the UTF-8 perl driver issue is something to consider when choosing MySQL or PostgreSQL.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Thanks to Dominic Mitchell for mentioning the latest developer release, &lt;a href="http://search.cpan.org/~capttofu/DBD-mysql-3.0007_1/"&gt;DBD::mysql 3.0007_1&lt;/a&gt; released on 8 Sep 2006, has integrated UTF-8 support. It's a developer release but good things are finally happening!&lt;/p&gt;</description>
      <pubDate>Mon, 02 Oct 2006 10:35:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:559515eb-db34-4760-832f-3b103e81fc08</guid>
      <author>John Wang</author>
      <link>http://www.dev411.com/blog/2006/10/02/perl-mysql-and-utf-8</link>
      <category>perl</category>
      <category>mysql</category>
      <category>unicode</category>
      <category>orm</category>
    </item>
    <item>
      <title>Encoding Hashed UIDs: Base64 vs. Hex vs. Base32</title>
      <description>&lt;p&gt;I recently looked at using various encodings for hashed UIDs, e.g. UIDs generated by a crytographic hash algorithm such as SHA-1 or MD5. These are often useful when the UID does not need to have human meaning but should exhibit some uniformity, such as character set and length. I considered Base64 and hexadecimal first because they are commonly used by crypto libraries and then decided on Base64 and Base32 where appropriate. Base36 is actually the most compact case insensitive encoding (using Arabic numbers and Roman letters) but is not an option for me at the moment because there's no Perl module for it that will take arbitrary text and binary input at the moment. &lt;a href="http://search.cpan.org/~rhenssel/Math-Base36-0.02/Base36.pm"&gt;Math::Base36&lt;/a&gt; exists but only handles numbers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Base64&lt;/strong&gt; has the advantage of generating shorter representations because it uses a 64 character set instead of hexadecimal's 16. While Base 64 can use any 64 characters, many implementations follow &lt;a href="http://tools.ietf.org/html/rfc1421"&gt;IETF PEM RFC 1421&lt;/a&gt; which specifies A-Z, a-z, 0-9, / and + while using = for padding. Because + and / need to be URI escaped, Wikipedia mentions a variant that uses * and - in place of + and / respectively and removes line breaks as well as padding. I used this for a while but unfortunate * cannot be used in DOM ids. Because of this I've switched to using _- instead.&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;Hexadecimal&lt;/strong&gt; uses 0-9 and A-F and is case insensitive. The representations are longer due to the smaller character set, but case insensitivy can be advantageous in certain situations such as full text indexing with Xapian which is case sensitive, and MySQL which is case insensitive by default. It's common practices to lowercase all the indexed terms using Xapian while reserving uppercase characters for boolean and probabilistic term prefixes. After thinking about how the query parser works for a bit, my conclusion is that lower casing all the inexed terms will make life with Xapian a lot easier. To &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/case-sensitivity.html"&gt;enable case sensitivity in MySQL&lt;/a&gt;, the table definition needs to be changed.&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;Base32&lt;/strong&gt; is the middle ground between the 16 character hex and 64 character Base64 encodings, but does not get included in crypto libraries. For UIDs, however, it is especially attractive because it uses a larger character set than hexadecimal resulting in shorter representations and is case insensitive for applications that work better with it. Base32, as defined in &lt;a href="http://tools.ietf.org/html/rfc3548"&gt;IETF RFC 3548&lt;/a&gt;, uses the characters A-Z and 2-7. Since Base32 isn't included in many crypto libraries, an extra encoding is needed, however, creating hashed UIDs only happens once per entry so it seems reasonable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are some modules on CPAN for Base32 including &lt;a href="http://search.cpan.org/~danpeder/MIME-Base32-1.01/Base32.pm"&gt;MIME::Base32&lt;/a&gt; and &lt;a href="http://search.cpan.org/~miyagawa/Convert-Base32-0.02/lib/Convert/Base32.pm"&gt;Convert::Base32&lt;/a&gt;. For Base32, I'm currently using a patched copy of MIME::Base32 because the CPAN version only handles uppercase. For Base64, I'm using _ and - as the two non-alphanumeric characters.&lt;/p&gt;</description>
      <pubDate>Mon, 02 Oct 2006 03:08:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:54765f65-4ef7-4bd7-834b-8631923cf4ce</guid>
      <author>John Wang</author>
      <link>http://www.dev411.com/blog/2006/10/02/encoding-hashed-uids-base64-vs-hex-vs-base32</link>
      <category>perl</category>
      <category>mysql</category>
      <category>xapian</category>
    </item>
    <item>
      <title>Perl - Strictify utf8 to UTF-8</title>
      <description>&lt;p&gt;Perl has two UTF-8 encodings, &lt;span class="fix"&gt;utf8&lt;/span&gt; which is Perl's liberal version and &lt;span class="fix"&gt;UTF-8&lt;/span&gt; which is a strict interpretation, aka &lt;span class="fix"&gt;utf-8-strict&lt;/span&gt;. The liberal version allows for encoded characters outside the UTF-8 character set, however you can run into problems when interoperating with applications that expect &lt;span class="fix"&gt;utf-8-strict&lt;/span&gt;, such as PostgreSQL. Here's a function I wrote to strictify &lt;span class="fix"&gt;utf8&lt;/span&gt; to &lt;span class="fix"&gt;UTF-8&lt;/span&gt; using the Encode core module:&lt;/p&gt;

&lt;pre&gt;use Encode;

sub strictify_utf8 {
    my $data = shift;
    if (Encode::is_utf8($data) &amp;&amp; !Encode::is_utf8($data,1)) {
        Encode::_utf8_off($data);
        Encode::from_to($data, 'utf8', 'UTF-8');
        Encode::_utf8_on($data);
    }
    return $data;
}&lt;/pre&gt;

</description>
      <pubDate>Fri, 29 Sep 2006 13:21:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:6b24eecf-4fda-43d5-94da-7497d3ed337c</guid>
      <author>John Wang</author>
      <link>http://www.dev411.com/blog/2006/09/29/perl-strictify-utf8-to-UTF-8</link>
      <category>postgresql</category>
      <category>perl</category>
      <category>unicode</category>
    </item>
    <item>
      <title>Perl - Getting a Unicode Character's Hex Codepoint</title>
      <description>&lt;p&gt;I recently responded to someone asking how to get a Unicode hex codepoint from a Unicode literal on DevShed Forums. Since I think it may be more generally useful, here's my solution. The following function takes a unicode literal, converts it to a decimal representation using &lt;span class="fix"&gt;unpack&lt;/span&gt; and then converts it to hex usning &lt;span class="fix"&gt;sprintf&lt;/span&gt;:&lt;/p&gt;

&lt;pre&gt;sub codepoint_hex {
    if (my $char = shift) {
        return sprintf '%2.2x', unpack('U0U*', $char);
    }
}

my $cp = codepoint_hex('&#12459;'); # eq '30ab'&lt;/pre&gt;

&lt;p&gt;Using &lt;span class="fix"&gt;unpack&lt;/span&gt; is a nice solution here because the U0 option will require the literal to be strict &lt;span class="fix"&gt;UTF-8&lt;/span&gt;, aka &lt;span class="fix"&gt;utf-8-strict&lt;/span&gt; and not Perl's liberal &lt;span class="fix"&gt;utf8&lt;/span&gt; version. It throws a warning if the literal is not valid &lt;span class="fix"&gt;UTF-8&lt;/span&gt;. The other nice thing about using unpack is it works whether the UTF-8 flag is on or not, removing one check.&lt;/p&gt;

&lt;p&gt;An alternate way to get the decimal representation from the literal is to use &lt;span class="fix"&gt;ord&lt;/span&gt; instead of &lt;span class="fix"&gt;unpack&lt;/span&gt;, but &lt;span class="fix"&gt;ord&lt;/span&gt; requires the UTF-8 flag to be on. This can be turned on with &lt;span class="fix"&gt;Encode::_utf_on&lt;/span&gt; but that just turns the flag on without checking for strict UTF-8 so you'll have to do that with another check.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; &lt;a href="http://bulknews.typepad.com/"&gt;miyagawa&lt;/a&gt; just showed me how to use &lt;span class="fix"&gt;ord&lt;/span&gt; with Encode:&lt;/p&gt;

&lt;pre&gt;use Encode;

sub codepoint_hex {
    sprintf "%04x", ord Encode::decode("UTF-8", shift);
}&lt;/pre&gt;</description>
      <pubDate>Fri, 29 Sep 2006 13:00:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:72b931ef-8049-4229-aa6b-7f8eaff60fbe</guid>
      <author>John Wang</author>
      <link>http://www.dev411.com/blog/2006/09/29/perl-getting-a-unicode-characters-hex-codepoint</link>
      <category>perl</category>
      <category>unicode</category>
    </item>
    <item>
      <title>Perl 5 - Powering Web 2.0</title>
      <description>&lt;p&gt;Whenever popular Perl sites are discussed, a number of large websites are mentioned with the usual suspects being Amazon, IMDB, LiveJournal, Slashdot and others. While this is a good list, what often doesn't get mentioned is the new Web 2.0 sites that Perl 5 is powering. Perl 5 web frameworks (such as &lt;a href="http://www.catalystframework.org"&gt;Catalyst&lt;/a&gt; and &lt;a href="http://www.jifty.org"&gt;Jifty&lt;/a&gt;), OO models (&lt;a href="http://search.cpan.org/dist/Moose/lib/Moose.pm"&gt;Moose&lt;/a&gt;) and other techniques (&lt;a href="http://par.perl.org"&gt;PAR&lt;/a&gt;) dramatically improve Perl for web development and large-scale projects making many complaints about the language irrelevant. These, when combined with CPAN, continue to make Perl 5 a very attractive language for new web apps.&lt;/p&gt;

&lt;p&gt;Examples of Perl-powered Web 2.0 sites include del.icio.us, (which uses the &lt;a href="http://www.masonhq.com"&gt;Mason&lt;/a&gt; templating system / mini-framework), EditGrid (an AJAX-enhanced online spreadsheet running on the Catalyst framework) and Vox (a multi-user blogging site by Six Apart, maker of LiveJournal, MovableType and TypePad). Other sites include HiveMinder, IUseThis, and MighTyV. Of these six sites, four are running on the Catalyst framework. HiveMinder is built on the Jifty framework. Yahoo is even interested in developers with Perl/Catalyst skills along with C and Java  for this &lt;a href="http://www.dev411.com/images/articles/200609/web20perl_yahoojob.png"&gt;Senior Software Engineering position&lt;/a&gt; (screenshot from &lt;a href="http://jobs.perl.org"&gt;jobs.perl.org&lt;/a&gt;). Screenshots and links of active sites are provided below.&lt;/p&gt;

&lt;div style="text-align:center"&gt;

&lt;table class="web20perl"&gt;&lt;tr&gt;&lt;td&gt;
&lt;a href="http://del.icio.us/"&gt;&lt;img class="w2p_image" alt="del.icio.us" src="http://www.dev411.com/images/articles/200609/web20perl_delicious_thumb.png" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td class="web20perl"&gt;
&lt;strong&gt;del.icio.us&lt;/strong&gt;&lt;br /&gt;
Description: Social Bookmarking&lt;br /&gt;
Perl Framework: Mason
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;table class="web20perl"&gt;&lt;tr&gt;&lt;td&gt;
&lt;a href="http://www.editgrid.com/"&gt;&lt;img class="w2p_image" alt="editgrid" src="http://www.dev411.com/images/articles/200609/web20perl_editgrid_thumb.png" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td class="web20perl"&gt;
&lt;strong&gt;EditGrid&lt;/strong&gt;&lt;br /&gt;
Description: Online Spreadsheets&lt;br /&gt;
Perl Framework: Catalyst
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;/div&gt;


&lt;div style="text-align:center"&gt;

&lt;table class="web20perl"&gt;&lt;tr&gt;&lt;td&gt;
&lt;a href="http://www.hiveminder.com/"&gt;&lt;img class="w2p_image" alt="hiveminder" src="http://www.dev411.com/images/articles/200609/web20perl_hiveminder_thumb.png" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td class="web20perl"&gt;
&lt;strong&gt;HiveMinder&lt;/strong&gt;&lt;br /&gt;
Description: To Do Lists&lt;br /&gt;
Perl Framework: Jifty
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;table class="web20perl"&gt;&lt;tr&gt;&lt;td&gt;
&lt;a href="http://osx.iusethis.com/"&gt;&lt;img class="w2p_image" alt="iusethis" src="http://www.dev411.com/images/articles/200609/web20perl_iusethis_thumb.png" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td class="web20perl"&gt;
&lt;strong&gt;IUseThis&lt;/strong&gt;&lt;br /&gt;
Description: App Lists&lt;br /&gt;
Perl Framework: Catalyst
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;table class="web20perl"&gt;&lt;tr&gt;&lt;td&gt;
&lt;a href="http://www.mightyv.com/day/"&gt;&lt;img class="w2p_image" alt="mightyv" src="http://www.dev411.com/images/articles/200609/web20perl_mightyv_thumb.png" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td class="web20perl"&gt;
&lt;strong&gt;MighTyV&lt;/strong&gt;&lt;br /&gt;
Description: TV/Radio Listings&lt;br /&gt;
Perl Framework: Catalyst
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;table class="web20perl"&gt;&lt;tr&gt;&lt;td&gt;
&lt;a href="http://www.vox.com/"&gt;&lt;img class="w2p_image" alt="vox" src="http://www.dev411.com/images/articles/200609/web20perl_vox_thumb.png" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td class="web20perl"&gt;
&lt;strong&gt;Vox&lt;/strong&gt;&lt;br /&gt;
Description: Blogging site by Six Apart&lt;br /&gt;
Perl Framework: Catalyst
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;/div&gt;

&lt;p&gt;These sites show that Perl 5 is alive and well as a language of choice for Web 2.0. Although Perl 5 is over 10 years old, the combination of new frameworks and techniques, combined with CPAN's 10,000+ modules, continue to make Perl an attractive choice. The key is to use make sure you are familiar with modern Perl programming techniques.&lt;/p&gt;.</description>
      <pubDate>Tue, 05 Sep 2006 10:07:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:48685d3d-e5fa-4633-acac-99cd5e3e0b63</guid>
      <author>John Wang</author>
      <link>http://www.dev411.com/blog/2006/09/05/perl-5-powering-web-2-0</link>
      <category>catalyst</category>
      <category>perl</category>
    </item>
    <item>
      <title>Recommendations for The Perl Foundation</title>
      <description>&lt;p&gt;Bill Odom, President of The Perl Foundation, recently posted &lt;a href="http://news.perlfoundation.org/2006/08/tpf_rfc.html"&gt;a blog entry called TPF RFC&lt;/a&gt;. My comment to that blog entry wasn't approved for some reason so I figured I'd post some easy-to-accomplish recommendations here.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Community events calendar:&lt;/strong&gt; Perl should adopt something like &lt;a href="http://www.php.net/"&gt;PHP.net's events calendar sidebar&lt;/a&gt; for the perl.org and pm.org sites. There is a lot of activity in the Perl community including YAPC conferences, Perl Monger user group meetings (often monthly), Perl Hackathons (Chicago Perl Hackathon is upcoming) and other events such as the Pittsburgh Perl Workshop (also upcoming). Right now, there's no central place to find a list of these events. Having a calendar on the perl.org and pm.org homepages will highlight the activity level of and events happening in the Perl community.&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;Use Perl-based software for TPF sites:&lt;/strong&gt; The Planet Perl, Planet Perl Six and Planet Parrot websites run by TPF use the Python-based Planet (aka PlanetPlanet) Atom/RSS aggregator software and say "powered by python" and/or "powered by planetplanet." While it's nice to use FOSS, &lt;a href="http://plagger.org/"&gt;Plagger&lt;/a&gt; is a perfectly fine Perl-based Atom/RSS aggregator. In fact, Plagger has a much nicer and more extensible architecture than Planet. TPF should support Perl by running software written in Perl.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'm not sure how good TPF is at communicating with the community but the impression I've gotten is that they don't communicate very well. I think it would be nice if:&lt;/p&gt;
 
&lt;ul&gt;
&lt;li&gt;TPF talked about future plans, like open source projects do&lt;/li&gt;
&lt;li&gt;TPF officers responded to emails&lt;/li&gt;
&lt;li&gt;TPF blog allowed unmoderated comments or had a more liberal filter. There are very few comments on the blog so I'm guessing that many are not approved. Either that or the moderation has discouraged people from commenting. I would normally expect more comments on something like TPF blog.&lt;/li&gt;
&lt;li&gt;there was a TPF IRC channel that can be attended by community at large, say &lt;span class="fix"&gt;#tpf&lt;/span&gt; at irc.perl.or&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Just a few observations. In any event, I'd love to see an events calendar on the perl.org and pm.org sites as well as TPF sites actually using Perl. Better communication would be a bonus.&lt;/p&gt;</description>
      <pubDate>Sat, 26 Aug 2006 21:28:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:2300dafc-d471-4666-a65c-2fe03ddfa6bc</guid>
      <author>John Wang</author>
      <link>http://www.dev411.com/blog/2006/08/26/recommendations-for-the-perl-foundation</link>
      <category>perl</category>
    </item>
    <item>
      <title>Lucene on CPAN</title>
      <description>&lt;p&gt;&lt;a href="http://lucene.apache.org/"&gt;Lucene&lt;/a&gt; is a Java-based fulltext indexing and search solution run under the Apache Foundation. It is arguably the most popular of &lt;a href="http://www.dev411.com/wiki/Search_Libraries"&gt;many fulltext solutions&lt;/a&gt; now but its use of Java makes it a secondary choice for many non-Java projects. To improve the speed of Lucene, there are several C/C++ ports including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://incubator.apache.org/lucene4c/"&gt;Lucene4c&lt;/a&gt;: Apache Foundation project&lt;/li&gt;
&lt;li&gt;&lt;a href="http://lucene.apache.org/lucy/"&gt;Lucy&lt;/a&gt;: Apache Foundation project&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sourceforge.net/projects/clucene/"&gt;CLucene&lt;/a&gt;: Sourceforge project&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a long time Perl users who wanted fulltext search capabilities chose between &lt;a href="http://search.cpan.org/~tmtm/Plucene-1.24/lib/Plucene.pm"&gt;Plucene&lt;/a&gt; (a Perl-port of Lucene), &lt;a href="http://www.xapian.org"&gt;Xapian&lt;/a&gt; (a C++ library with many language bindings) and several others. Plucene has a variety of performance problems so Xapian became the choice for many projects. Recently, the &lt;a href="http://search.cpan.org/~tbusch/Lucene-0.01/lib/Lucene.pm"&gt;Lucene module&lt;/a&gt; was added to CPAN as a wrapper around CLucene. The naming gets funny with all the ports because the Lucene Perl-module uses CLucene, not Lucene, and the CLucene project doesn't seem to be run under the Lucene project at the Apache Foundation, which runs the Lucene4c and Lucy C ports.&lt;/p&gt;

&lt;p&gt;I've been using Xapian and the &lt;a href="http://search.cpan.org/~kilinrax/Search-Xapian-0.9.6.0/Xapian.pm"&gt;Search::Xapian&lt;/a&gt; Perl-bindings for a while now and will continue to do so. It will be interesting to see if there's a shake out with the various C/C++ Lucene ports and if any of them will gain popularity. It will also be interesting to see if any of the C/C++ ports grow beyond being just a port of Lucene.&lt;/p&gt;</description>
      <pubDate>Mon, 21 Aug 2006 20:15:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:4316b3c9-f6af-4f38-ac8a-96153b9ed0d7</guid>
      <author>John Wang</author>
      <link>http://www.dev411.com/blog/2006/08/21/lucene-on-cpan</link>
      <category>perl</category>
    </item>
    <item>
      <title>Automated web screen shots with Perl</title>
      <description>&lt;p&gt;I've been looking for a program that will take full screen shots of web pages even when the web page is larger than the window size on my physical screen, requiring scrolling. This morning I found such a program in Petr &#352;mejkal's &lt;a href="http://search.cpan.org/~psme/Win32-CaptureIE-1.30/CaptureIE.pm" class="fix"&gt;Win32::CaptureIE&lt;/a&gt; when it was mentioned by Displeaser on &lt;a href="http://forums.devshed.com"&gt;DevShed Forums&lt;/a&gt; in the "&lt;a href="http://forums.devshed.com/perl-programming-6/screenshot-of-webpage-370275.html"&gt;Screenshot of webpage&lt;/a&gt;" thread. It uses ImageMagick for image manipulation.&lt;/p&gt;

&lt;p&gt;From reading the &lt;span class="fix"&gt;Win32::CaptureIE&lt;/span&gt; POD, the CapturePage function does exactly what I want:&lt;/p&gt;

&lt;div class="quote_simple"&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;CapturePage ( )&lt;/strong&gt; Captures whole page currently loaded in the Internet Explorer window. Only the page content will be captured - no window, no scrollbars. If the page is smaller than the window only the occupied part of the window will be captured. If the page is longer (scrollbars are active) the function will capture the whole page step by step by scrolling the window content (in all directions) and will return a complete image of the page.&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;After installing ImageMagick, &lt;span class="fix"&gt;Image::Magick&lt;/span&gt; and &lt;span class="fix"&gt;Win32::CaptureIE&lt;/span&gt; on my Windows / ActiveState Perl system, I generated &lt;a href="/images/articles/200607/dev411blog_win32captureie.png"&gt;this screen shot&lt;/a&gt; with the following short program using no additional processing:&lt;/p&gt;

&lt;pre&gt;#!perl
use strict; use warnings;
use Win32::CaptureIE;

StartIE( width =&gt; 900 );
Navigate( 'http://www.dev411.com/blog/' );

my $img = CapturePage();
$img-&gt;Write( 'capture.png' );
QuitIE;&lt;/pre&gt;

&lt;p&gt;Perl and CPAN continue to amaze me with their treasure trove of functionality. Are there  similar tools for using Firefox, Linux, other image libraries or languages?&lt;/p&gt;

&lt;div class="update"&gt;&lt;p&gt;&lt;b&gt;UPDATE:&lt;/b&gt; ishnid has found two programs with CLIs (posted to the same thread):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://khtml2png.sourceforge.net/"&gt;khtml2png&lt;/a&gt; on SourceForge. This is a command-line program that looks like it can be run without a browser. It uses &lt;span class="fix"&gt;libkhtml&lt;/span&gt; (used by Konqueror) and ImageMagick's &lt;span class="fix"&gt;convertn&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pearlcrescent.com/products/pagesaver/"&gt;Pearl Crescent Page Saver&lt;/a&gt;, a commercial app but available in a free version. This is a Firefox extension and requires the browser.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;b&gt;UPDATE 2:&lt;/b&gt;: I recently tried Win32::CaptureIE with ImageMagick 6.3.0 and it doesn't work. Apparently there used to be a link to "PerlMagick" in older versions of ImageMagick that may not exist anymore. Unfortunately Win32::CaptureIE relies on PerlMagick.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;UPDATE 3:&lt;/b&gt;: I just tried the free version of Pearl Crescent with Firefox 1.5.0.7 which it says it should support but I get a "Download error" with pageserverbasic-1.3.xpi.&lt;/p&gt;

&lt;/div&gt;</description>
      <pubDate>Fri, 21 Jul 2006 10:02:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:829678746bcf7e466ae1a607174ea863</guid>
      <author>John Wang</author>
      <link>http://www.dev411.com/blog/2006/07/21/automated-web-screen-shots-with-perl</link>
      <category>imagemagick</category>
      <category>ie</category>
      <category>perl</category>
    </item>
  </channel>
</rss>
