Joining several others, I'm moving my Perl blogging off of use.perl.org. My personal Perl blog posts will be here.
I sometimes write about Perl on my company blog here.
On my own site, I'll be able to see my own traffic stats, control the SEO, and provide a unique design. I think having a plurality of blogs promoting and discussing Perl is a good thing.
My perl feed also appears as one of the feeds on Perl Sphere.
Today the first HTTP::Engine release appeared that replaces Moose with Shika. Shika provides the essential class-building tools that HTTP::Engine needs with a Moose-compatible syntax, and strips out the rest of the magic.
The performance improvement was dramatic. The "Hello World" time dropped to 0.19seconds on the same hardware (almost 10 times as fast!) and the memory usage dropped to 6.6 Megs.
Catalyst is currently slated to use Moose in the next major version. Now that HTTP::Engine has switched away from Moose for better performance and memory savings, will other projects follow suit?
Sometimes when I'm scanning an email archive, it would be useful to see it represented as a timeline. So instead of a stored listed, I'd see a cluster of messages in October 2007, and then another bunch in summer 2008, and could zoom in on that.
The closest interface that comes to mind is the bar graph display seen in modern Movable Type admin areas.
At some point a CGI::Application::Plugin::ValidateRM test started failing, and I'm having a heck of time figuring out why.
I'm fairly sure something in the dependency chain changed behavior, and I've been unable to track down what the real issue is.
I'll be in Portland, OR next week (and will possibly attend the PDX PM meeting), and hopefully Lazyweb will have an answer for me about this when I get back.
Today I made progress on making a self-contained distribution of the Titanium web framework.
The goal is to have a single archive file you can unpack and have a complete web framework to work with-- no more CPAN dependencies to install! You can play with it on your desktop or laptop with the built-in web server, and upload a directory to your web server when you read to go live.
After I patched the great local::lib module, I can now use this simple command to create a "Titanium" directory, into which Titanium and all of it's non-core dependencies will be installed.
perl -MCPAN -Mlocal::lib=--self-contained,Titanium -e 'install Titanium'
The next step is to hopefully eliminate required dependencies on XS code. The following modules need to be address:
Params::Validate should be easy to handle, since it has a Pure Perl alternative. I haven't decided now to deal with the other two yet.
I can post an archive of what I have so far if it's of interest. The XS modules above are compiled for 'i486-linux-gnu-thread-multi'.
<pokes around >
Yes, Params::Validate was easy enough to take care of. For the other two, I may just handle them with documentation:
"If you want to use fill_form()" method, you may need to install the "HTML::Parser" module, which requires access to a C compiler".
"Likewise, if you want to use Test::WWW::Mechanize, you may need to install Compress::Zlib, which requires also requires access to a C-compiler"
Devel::Declare seems to be the new hotness, quickly inspiring several more modules to use it including Method::Signatures, MooseX::Method::Signatures, Sub::Curried, Sub::Auto, and CGI::Application::Plugin::RunmodeDeclare.
But whose ready to run this hairy black magic and production? Perhaps this is good match for using
Workable? Good idea?
Perhaps my favorite parts of Perl 6 are subroutine signatures and getting rid of "
my $self = shift;".
These features available now in Perl 5, without source filters, using Method::Signatures.
Sure, it's labeled as "ALPHA" involves some dark magic to make it work, but it's there to play with. And if it can be hacked up as a module, surely it would be feasible to add to Perl 5.12....
The first developer release of Titanium has now been
uploaded to CPAN and should be available shortly.
Titanium is a next generation web framework based on CGI::Application.
Titanium is designed to provide the underlying strength and flexibility of the
CGI::Application framework, while being more user-friendly to deploy and
To this end, several useful plugins for CGI::Application are bundled by default
with CGI::Application and are documented directly in Titanium.
Several practices are specifically recommended and documented, such as using
URI dispatching, while details for alternative and advanced functionality for
CGI::Application are not included here. Those advanced docs remain available in
Several useful development and testing tools are installed along with Titanium as well.
Here's the full list modules that come with it:
my $a = my $b;
I've started using Google Code Search to turn up prior art.
In this case, I quickly discovered that, Yes, that's valid, and people are actually using it.
Remember to include
lang:perl to restrict a search to Perl.
H.Merijn Brand, the Text::CSV_XS maintainer has been dicussing possibilities for adding parsing rows as hashrefs to that module through this RT ticket.
As fate would have it, our efforts to implement it crossed paths, and we now both have fairly complete but somewhat different patches for the feature. A couple points to get feedback on:
Which you do find clearer for setting the column names to use as the hash keys:
I have already been confused about whether "hr" stood for "header row" or "hashref", so I vote for the former.
The second point, which is currently in neither patch, is "how you design the interface to automatically setting the column names from the first row of the CSV?"
Parse::CSV uses new( fields => 'auto' ), but involving new() won't work for Text::CSV_XS.
I was thinking of perhaps:
Which would simply mean:
$csv->column_names( $csv->getline($io) );
We would leave it up to documentation to make sure users called this first thing.
Alternately, you could have a function that stores the current file position, rewinds and reads the first row, and then returns to the current position. That seems more fragile to me, and I can oly imagine there are some non-rewindable filehandles out there for which it wouldn't work.
You can leave feedback here and/or in the RT ticket.