Strip trailing spaces
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Script / Test.pm
1 package Catalyst::Script::Test;
2 use Moose;
3 use Pod::Usage;
4 use FindBin;
5 use lib "$FindBin::Bin/../lib";
6 with 'MooseX::Getopt';
7 use namespace::autoclean -except => [ qw(meta) ];
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
24 1;