Merge branch 'master' into psgi
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Script / CGI.pm
index 4608a7c..dc7f20f 100644 (file)
@@ -1,39 +1,35 @@
 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::autoclean;
 
-with 'MooseX::Getopt';
+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
 
-has _app => (
-    reader   => 'app',
-    init_arg => 'app',
-    traits => [qw(NoGetopt)],
-    isa => 'Str',
-    is => 'ro',
-);
+This is a script to run the Catalyst engine specialized for the CGI environment.
 
-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