File Coverage

blib/lib/Catalyst/Script/Test.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 18 19 94.7


line stmt bran cond sub pod time code
1             package Catalyst::Script::Test;
2 2     2   77455 use Moose;
  2         478628  
  2         16  
3 2     2   16588 use Catalyst::Test ();
  2         10  
  2         89  
4 2     2   16 use namespace::clean -except => [ 'meta' ];
  2         7  
  2         22  
5              
6             with 'Catalyst::ScriptRole';
7              
8             sub run {
9 2     2 0 1950 my $self = shift;
10              
11 2         91 Catalyst::Test->import($self->application_name);
12              
13 2         5 foreach my $arg (@{ $self->ARGV }) {
  2         85  
14 2         46 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