X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FScript%2FCGI.pm;h=4eb9be8af158ebfbcc76eadbe67af8f39e7f51ff;hp=4608a7cd30c73f46e7102b753c6bc3d46e46b3b9;hb=eefc03e12890c06c9a76d78b4d68e3b2ad781328;hpb=7f67b4a91471d952f5f52a216c85a1bd061f6f7c diff --git a/lib/Catalyst/Script/CGI.pm b/lib/Catalyst/Script/CGI.pm index 4608a7c..4eb9be8 100644 --- a/lib/Catalyst/Script/CGI.pm +++ b/lib/Catalyst/Script/CGI.pm @@ -1,39 +1,40 @@ package Catalyst::Script::CGI; use Moose; +use namespace::clean -except => [ 'meta' ]; -BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' } -use FindBin qw/$Bin/; -use lib "$Bin/../lib"; -use Pod::Usage; -use Moose; -use namespace::autoclean; +sub _plack_engine_name { 'CGI' } -with 'MooseX::Getopt'; +with 'Catalyst::ScriptRole'; -has _app => ( - reader => 'app', - init_arg => 'app', - traits => [qw(NoGetopt)], - isa => 'Str', - is => 'ro', -); +__PACKAGE__->meta->make_immutable; +1; -has help => ( - traits => [qw(Getopt)], - cmd_aliases => 'h', - isa => 'Bool', - is => 'ro', - documentation => qq{ display this help and exits }, -); +=head1 NAME +Catalyst::Script::CGI - The CGI Catalyst Script -sub run { - my $self = shift; +=head1 SYNOPSIS - pod2usage() if $self->help; - my $app = $self->app; - Class::MOP::load_class($app); - $app->run; + myapp_cgi.pl [options] -} -1; + 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 + +Catalyst Contributors, see Catalyst.pm + +=head1 COPYRIGHT + +This library is free software. You can redistribute it and/or modify it under +the same terms as Perl itself. + +=cut