Commit | Line | Data |
0ba6e8aa |
1 | package Catalyst::Script::Test; |
accb0640 |
2 | use Moose; |
451b2a44 |
3 | use Pod::Usage; |
4 | use FindBin; |
5 | use lib "$FindBin::Bin/../lib"; |
6 | with 'MooseX::Getopt'; |
4ebd5ecf |
7 | use namespace::autoclean -except => [ qw(meta) ]; |
451b2a44 |
8 | |
9 | has app => ( isa => 'Str', is => 'ro', required => 1 ); |
10 | has help => ( isa => 'Bool', is => 'ro', required => 0, default => sub { 0 } ); |
11 | |
12 | |
13 | sub run { |
14 | my $self = shift; |
15 | |
16 | Class::MOP::load_class("Catalyst::Test"); |
17 | Catalyst::Test->import($self->app); |
18 | |
19 | pod2usage(1) if ( $self->help || !$ARGV[1] ); |
20 | print request($ARGV[1])->content . "\n"; |
21 | |
22 | } |
23 | |
0ba6e8aa |
24 | 1; |