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