STORY
My CPAN Distributions as MERLYN: File::Finder, CGI::Prototype, sh2perl, and Acme::Current
My CPAN Distributions as MERLYN: File::Finder, CGI::Prototype, sh2perl, and Acme::Current
- Alongside writing
chat2.pl(which helped bootstrap the early CPAN mirror network) and miniCPAN (which becameCPAN::Mini), I published several distinct distributions under my six-character PAUSE author IDMERLYN—ranging from my personal favorite daily tool (File::Finder) and a Smalltalk/Self-inspired prototype-based MVC web framework (CGI::Prototype) to an April Fools' joke from my Learning Perl classroom slides that took on a life of its own (sh2perl). 1.
File::Finder: Composablefind(1)Method Chaining with a FORTH"BUILDS...DOES"Heart- Out of all the modules I uploaded to CPAN,
File::Finder(0.52) was my personal favorite. - Standard Perl came with
File::Findand thefind2perlcommand-line translator, which generated monolithic callback subroutines that could not easily be composed or reused as objects. - I designed
File::Finderso developers could build the equivalent of almost any Unixfind(1)expression using fluent, composable method chaining:`perl use File::Finder; my @list = File::Finder ->type('d') ->eval('-f "SENTINEL-1" and -f "SENTINEL-2"') ->in(@ARGV);` - Under the hood, I used a FORTH-like
"BUILDS...DOES"meta-programming strategy for the method chaining, complete with an expression evaluator supporting booleanand,or,not, and parenthesized grouping (condition->and->not->left->this->or->that->right).
- Out of all the modules I uploaded to CPAN,
2.
CGI::Prototype&CGI::Prototype::Mecha: Born at the University at Buffalo (2004)- While consulting and teaching for Jim Brandt and the Administrative Computing Services team at the University at Buffalo in Buffalo, New York (where I famouslyforwarded the
CGI-Prototype-0.90.tar.gzPAUSE upload confirmation directly tocbrandt@buffalo.eduon December 1, 2004), I conceivedCGI::Prototype. - I wanted a clean, pluggable, step-by-step CGI request lifecycle handler, and I hated
CGI::Application—which forced web applications into awkward, rigid run-mode dispatch tables instead of true object-oriented state delegation. - Drawing inspiration from Smalltalk and Self's prototype-based inheritance, I built
CGI::Prototypeon top ofClass::Prototypedand Template Toolkit (along withCGI::Prototype::MechaforTest::WWW::Mechanizetesting). Every page or controller state was a prototype object that could inherit from and override specific lifecycle slots (dispatch,render,respond) on its parent page without heavyweight class ceremony. - I used
CGI::Prototypeextensively in production—both with Jim Brandt's team at the University at Buffalo and to power the booking and administrative web applications for Neil Bauman's Geek Cruises / Insight Cruises (GC::App). See also From Aztec Ruins to Buffalo Snowstorms and Baltic Sea Geek Cruise.
- While consulting and teaching for Jim Brandt and the Administrative Computing Services team at the University at Buffalo in Buffalo, New York (where I famouslyforwarded the
3.
sh2perl: The Learning Perl Slide Joke That Became a Real CPAN Distribution (April 1, 1998)- Perl shipped with
s2p(sedto Perl) anda2p(awkto Perl), so in my Stonehenge Consulting Services, Inc. Learning Perl course slides, I had a running classroom gag about a mythicalsh2perl("Bourne shell to Perl") translator—which simply took a/bin/shscript and wrapped anexec '/bin/sh', ...call around it! - On April 1, 1998 (
00:00:00 UTC), I decided to embody that slide joke in public by packaging it as an actual CPAN distribution (CPAN/authors/id/MERLYN/sh2perl-0.02.tar.gz) and posting an official-looking announcement tocomp.lang.perl.announce:"Yes! Finally! The long-awaited 'Shell to Perl' translator is now available! Works just like the a2p and s2p tools provided with the Perl distribution. Input a /bin/sh script, and output a Perl program!"
- On April 1, 1999, I followed up with
sh2perl-0.03.tar.gz, announcing an urgent "Y2K Update to '/bin/sh to Perl translator'". - For years afterward, engineers who missed the
1 Aprtimestamp emailed me earnest bug reports and enterprise evaluation inquiries asking whysh2perlwasn't translating theirtcshscripts!
- Perl shipped with
4.
Acme::Current(2003): A Daily-Expiring Stupid CPAN Trick- In 2003, I uploaded
Acme::Current(Acme-Current-YYYYMMDD), a playful "stupid CPAN trick" that exported the current year, month, and day as constants—meaning its unit test suite only passed on the exact day it was released, and started failing on CPAN Testers 24 hours later unless you downloaded the newest daily release!
- In 2003, I uploaded
What links here
These facts are as Randal recalls them, but much time has passed for most of this. If you find a factual error, please email realmerlyn@gmail.com.