Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of markjugg (792)

Wednesday December 31, 2008
04:28 PM

Moving my Perl blogging from

Joining several others, I'm moving my Perl blogging off of 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.

Monday December 01, 2008
06:08 PM

HTTP::Engine drops Moose for Shika, gains massive speedup

When I recently benchmarked several Perl website development tools, HTTP::Engine had dismal performance. The slowest performer, it took 1.5 seconds just to print "Hello World" in a CGI environment and took 14.6 megs of memory to it.

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?

Friday October 17, 2008
08:55 AM

Dear Lazyweb: Create a visual timeline of my e-mail folders

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.

Friday October 03, 2008
09:08 AM

Dear Lazyweb: Help me solve a hard bug in a popular module

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.

Take a look at the bug report and the test reports.

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.

Saturday September 27, 2008
04:24 PM

Progress on making a self-contained Titanium distribution

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:

  • Compress::Raw::Zlib
  • HTML::Parser
  • Params::Validate

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"

Thursday September 25, 2008
09:17 AM

Devel::Declare: A good fit for .pmc files?

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 .pmc files? If it works, it would mean that Devel::Declare is not actually used in production, but pure Perl ".pmc" file are used instead, which contains code that Devel::Declare generates.

Workable? Good idea?

Monday September 22, 2008
09:34 AM

My favorite part of Perl 6 available now in Perl 5

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....

Saturday August 09, 2008
08:33 AM

Announcing Titanium, a strong, lightweight web framework

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
develop with.

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:


Thursday June 26, 2008
08:32 AM

Tip: Google Code Search to find prior art for code syntax

Sometimes I wonder if a bit uncommon syntax is valid, and if it is, if anyone actually uses it. For example, I don't see "my" on the right side of an assignment operator very often:

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.

Thursday April 03, 2008
12:33 PM

Two alternate patches for rows-as-hashrefs in Text::CSV_XS

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.