Get Class::Load to do this for us
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Script / Test.pm
CommitLineData
0ba6e8aa 1package Catalyst::Script::Test;
accb0640 2use Moose;
95389116 3use Catalyst::Test ();
d9a32f71 4use namespace::autoclean;
451b2a44 5
d3082fac 6with 'Catalyst::ScriptRole';
451b2a44 7
8sub run {
9 my $self = shift;
10
e25affcb 11 Catalyst::Test->import($self->application_name);
57dc50b0 12
83065d4d 13 foreach my $arg (@{ $self->ARGV }) {
14 print request($arg)->content . "\n";
15 }
451b2a44 16}
17
73e4f0f1 18
d6e8e664 19__PACKAGE__->meta->make_immutable;
d3082fac 20
21=head1 NAME
22
23Catalyst::Script::Test - Test Catalyst application on the command line
24
25=head1 SYNOPSIS
26
3dcfb4c8 27 myapp_test.pl [options] /path
28
29 Options:
30 -h --help display this help and exits
d3082fac 31
32=head1 DESCRIPTION
33
3dcfb4c8 34Script to perform a test hit against your application and display the output.
d3082fac 35
36=head1 AUTHORS
37
38Catalyst Contributors, see Catalyst.pm
39
40=head1 COPYRIGHT
41
42This library is free software. You can redistribute it and/or modify it under
43the same terms as Perl itself.
44
45=cut