Remove DBIC deploy script, this should not be in core runtime
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Script / Test.pm
CommitLineData
0ba6e8aa 1package Catalyst::Script::Test;
accb0640 2use Moose;
451b2a44 3use Pod::Usage;
4use FindBin;
5use lib "$FindBin::Bin/../lib";
6with 'MooseX::Getopt';
4e45780e 7use MooseX::Types::Moose qw/Str Bool/;
d9a32f71 8use namespace::autoclean;
451b2a44 9
410d96eb 10#extends qw(MooseX::App::Cmd);
11
d9a32f71 12has _app => (
13 reader => 'app',
14 init_arg => 'app',
15 traits => [qw(NoGetopt)],
73e4f0f1 16 isa => Str,
d9a32f71 17 is => 'ro',
18);
19
20has help => (
21 traits => [qw(Getopt)],
22 cmd_aliases => 'h',
73e4f0f1 23 isa => Bool,
d9a32f71 24 is => 'ro',
25 documentation => qq{ display this help and exits },
26);
451b2a44 27
28
29sub run {
30 my $self = shift;
31
32 Class::MOP::load_class("Catalyst::Test");
33 Catalyst::Test->import($self->app);
57dc50b0 34
451b2a44 35 pod2usage(1) if ( $self->help || !$ARGV[1] );
36 print request($ARGV[1])->content . "\n";
57dc50b0 37
451b2a44 38}
39
73e4f0f1 40
d6e8e664 41__PACKAGE__->meta->make_immutable;
0ba6e8aa 421;