File: Test.pm

package info (click to toggle)
libcatalyst-perl 5.90114-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,068 kB
  • ctags: 1,490
  • sloc: perl: 13,413; makefile: 7
file content (50 lines) | stat: -rw-r--r-- 879 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package Catalyst::Script::Test;
use Moose;
use Catalyst::Test ();
use namespace::autoclean;

with 'Catalyst::ScriptRole';

sub run {
    my $self = shift;

    Catalyst::Test->import($self->application_name);

    foreach my $arg (@{ $self->ARGV }) {
        print request($arg)->content  . "\n";
    }
}


__PACKAGE__->meta->make_immutable;
1;

=head1 NAME

Catalyst::Script::Test - Test Catalyst application on the command line

=head1 SYNOPSIS

  myapp_test.pl [options] /path

  Options:
  -h     --help           display this help and exits

=head1 DESCRIPTION

Script to perform a test hit against your application and display the output.

=head1 SEE ALSO

L<Catalyst::ScriptRunner>

=head1 AUTHORS

Catalyst Contributors, see Catalyst.pm

=head1 COPYRIGHT

This library is free software. You can redistribute it and/or modify it under
the same terms as Perl itself.

=cut