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