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 -except => [ qw(meta) ];
+use namespace::autoclean;
-with 'MooseX::Getopt';
+with 'Catalyst::ScriptRole';
-has _app => (
- reader => 'app',
- init_arg => 'app',
- traits => [qw(NoGetopt)],
- isa => 'Str',
- is => 'ro',
-);
+sub run {
+ my ($self) = @_;
+ $self->_run_application;
+}
-has help => (
- traits => [qw(Getopt)],
- cmd_aliases => 'h',
- isa => 'Bool',
- is => 'ro',
- documentation => qq{ display this help and exits },
-);
+__PACKAGE__->meta->make_immutable;
+=head1 NAME
-sub run {
- my $self = shift;
+Catalyst::Script::CGI - The CGI Catalyst Script
- pod2usage() if $self->help;
- my $app = $self->app;
- Class::MOP::load_class($app);
- $app->run;
+=head1 SYNOPSIS
-}
-1;
+See L<Catalyst>.
+
+=head1 DESCRIPTION
+
+FIXME
+
+=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