X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FController%2FWrapCGI.pm;h=fa0d73ac34d968695eaffe4e0a3546b4866edca9;hb=47a5153fd919a2d6b4a5fa3968914924b366ad6b;hp=886e3b33e46f9f6e883a3fdd470a57016dd2c539;hpb=7fce5bb08f7ee5ec72ca09f79b3350b03f1e8a75;p=catagits%2FCatalyst-Controller-WrapCGI.git diff --git a/lib/Catalyst/Controller/WrapCGI.pm b/lib/Catalyst/Controller/WrapCGI.pm index 886e3b3..fa0d73a 100644 --- a/lib/Catalyst/Controller/WrapCGI.pm +++ b/lib/Catalyst/Controller/WrapCGI.pm @@ -15,27 +15,27 @@ Catalyst::Controller::WrapCGI - Run CGIs in Catalyst =head1 VERSION -Version 0.0022 +Version 0.0026 =cut -our $VERSION = '0.0022'; +our $VERSION = '0.0026'; =head1 SYNOPSIS package MyApp::Controller::Foo; use parent qw/Catalyst::Controller::WrapCGI/; + use CGI (); sub hello : Path('cgi-bin/hello.cgi') { my ($self, $c) = @_; $self->cgi_to_response($c, sub { - use CGI ':standard'; - - print header, start_html('Hello'), - h1('Catalyst Rocks!'), - end_html; + my $q = CGI->new; + print $q->header, $q->start_html('Hello'), + $q->h1('Catalyst Rocks!'), + $q->end_html; }); } @@ -55,6 +55,9 @@ In your .conf, configure which environment variables to pass: Allows you to run Perl code in a CGI environment derived from your L context. +B<*WARNING*>: do not export L functions into a Controller, it will break +with L 5.8 onward. + If you just want to run CGIs from files, see L. =head1 CONFIGURATION