X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FScript%2FCGI.pm;h=842d82c568fed28fb2fba4961bc269c26bec4863;hb=b1320d7d840eafaee3efab338ede2e05da9df739;hp=c894c73425a3f1a3d572321e7471b3a7ebe22d2b;hpb=accb06402d3587ada5117e80ca2f9b3722b2f1df;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Script/CGI.pm b/lib/Catalyst/Script/CGI.pm index c894c73..842d82c 100644 --- a/lib/Catalyst/Script/CGI.pm +++ b/lib/Catalyst/Script/CGI.pm @@ -1,25 +1,33 @@ package Catalyst::Script::CGI; use Moose; - BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' } -use FindBin qw/$Bin/; -use lib "$Bin/../lib"; -use Pod::Usage; -use Moose; -use namespace::clean -except => [ qw(meta) ]; +use namespace::autoclean; + +with 'Catalyst::ScriptRole'; + +has '+help' => (cmd_aliases => 'h'); + +__PACKAGE__->meta->make_immutable; + +=head1 NAME + +Catalyst::Script::CGI - The CGI Catalyst Script + +=head1 SYNOPSIS + +See L. + +=head1 DESCRIPTION + +This is a script to run the Catalyst engine specialized for the CGI environment. + +=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