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