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