added Deploy prototype
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Script / CGI.pm
CommitLineData
0ba6e8aa 1package Catalyst::Script::CGI;
accb0640 2use Moose;
0ba6e8aa 3
accb0640 4BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' }
5use FindBin qw/$Bin/;
6use lib "$Bin/../lib";
7use Pod::Usage;
8use Moose;
4ebd5ecf 9use namespace::autoclean -except => [ qw(meta) ];
accb0640 10
11with 'MooseX::Getopt';
12
13has app => ( isa => 'Str', is => 'ro', required => 1 );
14has help => ( isa => 'Bool', is => 'ro', required => 0, default => sub { 0 } );
15
16sub run {
17 my $self = shift;
57dc50b0 18
accb0640 19 pod2usage() if $self->help;
20 my $app = $self->app;
21 Class::MOP::load_class($app);
22 $app->run;
23
24}
0ba6e8aa 251;