Hi Mark On Mon, 2011-05-16 at 08:34 -0400, Mark Stosberg wrote: > > CGI::Application::Dispatch::PSGI gives any CGI script using CGI::App > > access to PSGI's amazing capabilities. It's what I use for every CGI > > script, nowadays. > > Ron, > > Could you test the Github version of CAD::PSGI if you haven't already? > As part of re-implementing it better, it should be a little faster, and > the calling syntax did have to change slightly.
I wasn't watching Github. I'll do that. But today (it's 7:55 am) I'm having reverse cycle air conditioning installed, meaning they have to tunnel thru the double brick lounge wall to install it. Maybe tomorrow. > Before: > > use Your::Application::Dispatch; > use CGI::Application::Dispatch::PSGI; > Your::Application::Dispatch->as_psgi; > > After: > > use Your::Application::Dispatch; > Your::Application::Dispatch->as_psgi; > > ### In Your::Application::Dispatch; > package Your::Application::Dispatch; > use base 'CGI::Application::Dispatch::PSGI'; > > > The full Synopsis is below. Here's the the link to the source: > > https://github.com/markstos/CGI--Application--Dispatch/blob/psgi-support/lib/CGI/Application/Dispatch/PSGI.pm > > The current maintainer of that namespace has give me authority to upload > this replacement version there, which has a more efficient implementation. > > > ###### > > =head1 SYNOPSIS > > =head2 Out of Box > > Under mod_perl: > > # change "Apache1" to "Apache2" as needed. > > <Location /> > SetHandler perl-script > PerlHandler Plack::Handler::Apache1 > PerlSetVar psgi_app /path/to/app.psgi > </Location> > > <Perl> > use Plack::Handler::Apache1; > Plack::Handler::Apache1->preload("/path/to/app.psgi"); > </Perl> > > Under CGI: > > This would be the instance script for your application, such > as /cgi-bin/dispatch.cgi: > > ### in your dispatch.psgi: > # ( in a persistent environment, use FindBin::Real instead. ) > use FindBin 'Bin'; > use lib "$Bin/../perllib'; > use Your::Application::Dispatch; > Your::Application::Dispatch->as_psgi; > > ### In Your::Application::Dispatch; > package Your::Application::Dispatch; > use base 'CGI::Application::Dispatch::PSGI'; > > > =head2 With a dispatch table > > package MyApp::Dispatch; > use base 'CGI::Application::Dispatch::PSGI'; > > sub dispatch_args { > return { > prefix => 'MyApp', > table => [ > '' => { app => 'Welcome', rm => 'start' }, > ':app/:rm' => { }, > 'admin/:app/:rm' => { prefix => 'MyApp::Admin' }, > ], > }; > } > > > ##### CGI::Application community mailing list ################ > ## ## > ## To unsubscribe, or change your message delivery options, ## > ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ## > ## ## > ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## > ## Wiki: http://cgiapp.erlbaum.net/ ## > ## ## > ################################################################ > > -- Ron Savage http://savage.net.au/ Ph: 0421 920 622 ##### CGI::Application community mailing list ################ ## ## ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ## ## ## ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ## ## ################################################################