X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FScript%2FTest.pm;h=8fe9d73f4b935d2fded0358abce4d2d451251717;hb=b1320d7d840eafaee3efab338ede2e05da9df739;hp=ed4ad64865ad6c138f6cd3f652df52ca047f8c37;hpb=57dc50b07c8e492f4eb4a0e946b38725fbdb5eb8;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Script/Test.pm b/lib/Catalyst/Script/Test.pm index ed4ad64..8fe9d73 100644 --- a/lib/Catalyst/Script/Test.pm +++ b/lib/Catalyst/Script/Test.pm @@ -1,24 +1,43 @@ package Catalyst::Script::Test; use Moose; -use Pod::Usage; -use FindBin; -use lib "$FindBin::Bin/../lib"; -with 'MooseX::Getopt'; -use namespace::autoclean -except => [ qw(meta) ]; +use namespace::autoclean; -has app => ( isa => 'Str', is => 'ro', required => 1 ); -has help => ( isa => 'Bool', is => 'ro', required => 0, default => sub { 0 } ); +with 'Catalyst::ScriptRole'; +has '+help' => (cmd_aliases => 'h'); 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"; } -1; + +__PACKAGE__->meta->make_immutable; + +=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