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=609df55493a5d29ea217ff94a2e271d6359a2772;hpb=8a289b5f348fedc6761768e8c91b34b5ca05afeb;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Script/CGI.pm b/lib/Catalyst/Script/CGI.pm index 609df55..3a9f449 100644 --- a/lib/Catalyst/Script/CGI.pm +++ b/lib/Catalyst/Script/CGI.pm @@ -1,39 +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. -with 'MooseX::Getopt'; +=head1 SEE ALSO -has _app => ( - reader => 'app', - init_arg => 'app', - traits => [qw(NoGetopt)], - isa => 'Str', - is => 'ro', -); +L -has help => ( - traits => [qw(Getopt)], - cmd_aliases => 'h', - isa => 'Bool', - is => 'ro', - documentation => qq{ display this help and exits }, -); +=head1 AUTHORS +Catalyst Contributors, see Catalyst.pm -sub run { - my $self = shift; +=head1 COPYRIGHT - 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