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


Catalyst-Runtime documentation Contained in the Catalyst-Runtime distribution.

Index


Code Index:

NAME

Top

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

SYNOPSIS

Top

  myapp_test.pl [options] /path

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

DESCRIPTION

Top

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

AUTHORS

Top

Catalyst Contributors, see Catalyst.pm

COPYRIGHT

Top


Catalyst-Runtime documentation Contained in the Catalyst-Runtime distribution.

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;