How to run *old* perl Kwiki (like 0.38) on PSGI

How to run *old* perl Kwiki (like 0.38) on PSGI

Saturday, 13 July 2013—subject to ongoing, unnanounced updates

Modern Perl Modern Perl at Powell’s, Modern Perl at Barnes and Noble, Modern Perl at, or download Modern Perl for free and then recommend it to your friends, write a great review, or otherwise spread the word.

I realize there is a dearth of documentation and exposition but here it is. If you found it you know what it is and why you might want it. Everyone else will just be like, WTF is wrong with Ashley? Why can’t he go back to threatening the President?

Well, I finally got around to and today so there’s some remote hope of something at some point. Some thing at somepoint. Fucking English.

The new version of Kwiki won’t install/run and has been broken on the CPAN for a long time. I have a decently large set of documents for a novel I never seem to write in the old one and it runs but needs CGI so won’t run on nginx (stock) and there aren’t enough hours in the day for apache anymore so–

#!/usr/bin/env perl                                                                                                                                                         
use strictures;
use Plack::Builder;
use Path::Tiny;
use Plack::App::WrapCGI;
use Plack::App::Directory;

my $psgi = path(__FILE__);

my $STATIC = Plack::App::Directory
    ->new({ root => $psgi->parent })

my $KWIKI = Plack::App::WrapCGI
    ->new( script => path( $psgi->parent, "index.cgi" ) )

builder {
    enable "Rewrite", rules => sub {
        return 301 if s{^/index.cgi/?}{/ua};
        return 301 if s{^/?$}{/ua};
    mount "/ua" => builder {
    mount "/" => $STATIC;