X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FScript%2FCGI.pm;h=3a9f449b181c70f151fc79c61a38a7e738eb7cea;hb=383c5be6711391bd114674e2dfb0b9e84a100a38;hp=48e1d43b4554167c208351ac220fb8bef7eda542;hpb=4ebd5ecfb1fa96ab81248520c86fe28ffa145ca4;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Script/CGI.pm b/lib/Catalyst/Script/CGI.pm index 48e1d43..3a9f449 100644 --- a/lib/Catalyst/Script/CGI.pm +++ b/lib/Catalyst/Script/CGI.pm @@ -1,25 +1,39 @@ package Catalyst::Script::CGI; use Moose; +use namespace::autoclean; -BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' } -use FindBin qw/$Bin/; -use lib "$Bin/../lib"; -use Pod::Usage; -use Moose; -use namespace::autoclean -except => [ qw(meta) ]; +sub _plack_engine_name { 'CGI' } + +with 'Catalyst::ScriptRole'; + +__PACKAGE__->meta->make_immutable; + +=head1 NAME + +Catalyst::Script::CGI - The CGI Catalyst Script + +=head1 SYNOPSIS + + myapp_cgi.pl [options] + + Options: + -? --help display this help and exits + +=head1 DESCRIPTION + +This is a script to run the Catalyst engine specialized for the CGI environment. + +=head1 SEE ALSO + +L + +=head1 AUTHORS -with 'MooseX::Getopt'; +Catalyst Contributors, see Catalyst.pm -has app => ( isa => 'Str', is => 'ro', required => 1 ); -has help => ( isa => 'Bool', is => 'ro', required => 0, default => sub { 0 } ); +=head1 COPYRIGHT -sub run { - my $self = shift; - - pod2usage() if $self->help; - my $app = $self->app; - Class::MOP::load_class($app); - $app->run; +This library is free software. You can redistribute it and/or modify it under +the same terms as Perl itself. -} -1; +=cut