X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FScript%2FTest.pm;h=268b1cdcb65332b55b0f09e3caad41cde82e0ae6;hb=3a8c155fa0077e949f68f29fbe4b835d5484a2c9;hp=a17ec9891f2734209167f20319da7956acd71d19;hpb=73e4f0f19c278740fa95796e30efb90a7b779713;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Script/Test.pm b/lib/Catalyst/Script/Test.pm index a17ec98..268b1cd 100644 --- a/lib/Catalyst/Script/Test.pm +++ b/lib/Catalyst/Script/Test.pm @@ -1,40 +1,41 @@ package Catalyst::Script::Test; use Moose; -use Pod::Usage; -use FindBin; -use lib "$FindBin::Bin/../lib"; -with 'MooseX::Getopt'; -use MooseX::Types::Moose qw/Str Bool/; +use Catalyst::Test (); use namespace::autoclean; -has _app => ( - reader => 'app', - init_arg => 'app', - traits => [qw(NoGetopt)], - isa => Str, - is => 'ro', -); - -has help => ( - traits => [qw(Getopt)], - cmd_aliases => 'h', - isa => Bool, - is => 'ro', - documentation => qq{ display this help and exits }, -); - +with 'Catalyst::ScriptRole'; sub run { my $self = shift; - Class::MOP::load_class("Catalyst::Test"); - Catalyst::Test->import($self->app); + Catalyst::Test->import($self->application_name); - pod2usage(1) if ( $self->help || !$ARGV[1] ); - print request($ARGV[1])->content . "\n"; + print request($ARGV[0])->content . "\n"; } __PACKAGE__->meta->make_immutable; -1; + +=head1 NAME + +Catalyst::Script::Test - Test Catalyst application on the command line + +=head1 SYNOPSIS + +See L. + +=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