So today I finished my month-long refactoring of the perl script that builds my homepage. If everything looks the same, that's a good thing! Underneath the surface, the script is a lot more beautiful and extendable. Personally, I came away with a much better understanding of object-oriented programming in Perl, a better feel for the advantages (and shortcomings) of several new Perl modules (the Perl Advent Calendar can rest well, knowing that it has introduced at least one hobbyist to the magical world of CPAN), and (for the umpteenth time I say this) thanks to Devel::Peek I think I finally have a handle on doing Unicode properly with Perl.
For the record, here is the list of modules I'm now using in this script:
use strict;
use utf8;
use lib "/home/msittig/local/lib/perl5/site_perl";
use CGI qw{:standard};
use XML::Feed ;
use XML::RSS;
use Data::Dumper::Simple;
use Image::Size;
use DateTime ;
use DateTime::TimeZone ;
use Date::DayOfWeek;
use Date::Calc ;
use Date::Parse ;
use Calendars::Net;
use File::Find;
use Encode ;
use Getopt::Long ;
use HTML::Template ;
use IO::All ;
use DateTime::Format::W3CDTF ;
use Digest::MD5 qw( md5_hex ) ;
use DateTime::Format::Strptime ;
use Devel::Peek ;
And the before-and-after comparison (wc
outputs line, word, and byte counts, in that order):
[msittig@wubi ~/msittig_html]# wc before.cgi && wc after.cgi 1127 4879 35103 build.cgi 983 3662 28270 msittig.cgi
Now, to go out and get some sunshine!
0 Comments:
Post a Comment
« Home
Post a Comment