Bug fix for require dieing as make_immutable doesn't return true.
[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;
f4de8c99 201;
d3082fac 21
22=head1 NAME
23
24Catalyst::Script::Test - Test Catalyst application on the command line
25
26=head1 SYNOPSIS
27
3dcfb4c8 28 myapp_test.pl [options] /path
29
30 Options:
31 -h --help display this help and exits
d3082fac 32
33=head1 DESCRIPTION
34
3dcfb4c8 35Script to perform a test hit against your application and display the output.
d3082fac 36
383c5be6 37=head1 SEE ALSO
38
39L<Catalyst::ScriptRunner>
40
d3082fac 41=head1 AUTHORS
42
43Catalyst Contributors, see Catalyst.pm
44
45=head1 COPYRIGHT
46
47This library is free software. You can redistribute it and/or modify it under
48the same terms as Perl itself.
49
50=cut