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 became CPAN::Mini), I published several distinct distributions under my six-character PAUSE author ID MERLYN—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: Composable find(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::Find and the find2perl command-line translator, which generated monolithic callback subroutines that could not easily be composed or reused as objects.
    • I designed File::Finder so developers could build the equivalent of almost any Unix find(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 boolean and, or, not, and parenthesized grouping (condition->and->not->left->this->or->that->right).
  • 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.gz PAUSE upload confirmation directly to cbrandt@buffalo.edu on December 1, 2004), I conceived CGI::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::Prototype on top of Class::Prototyped and Template Toolkit (along with CGI::Prototype::Mecha for Test::WWW::Mechanize testing). 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::Prototype extensively 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.
  • 3. sh2perl: The Learning Perl Slide Joke That Became a Real CPAN Distribution (April 1, 1998)

    • Perl shipped with s2p (sed to Perl) and a2p (awk to Perl), so in my Stonehenge Consulting Services, Inc. Learning Perl course slides, I had a running classroom gag about a mythical sh2perl ("Bourne shell to Perl") translator—which simply took a /bin/sh script and wrapped an exec '/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 to comp.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 Apr timestamp emailed me earnest bug reports and enterprise evaluation inquiries asking why sh2perl wasn't translating their tcsh scripts!
  • 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!
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.