Move the testapp out of the main directory and under t/, avoiding the need for a...
[catagits/Catalyst-Engine-STOMP.git] / t / script / stomptestapp_stomp.pl
CommitLineData
0a663589 1BEGIN {
2 $ENV{CATALYST_ENGINE} = 'Stomp';
3 require Catalyst::Engine::Stomp;
4}
5
6use strict;
7use warnings;
8use Getopt::Long;
9use Pod::Usage;
10use FindBin;
11use lib "$FindBin::Bin/../lib";
12
13my $debug = 0;
14my $help = 0;
15my $oneshot = 0;
16
17my @argv = @ARGV;
18
19GetOptions(
20 'debug|d' => \$debug,
21 'help|?' => \$help,
22 'oneshot' => \$oneshot,
23);
24
25pod2usage(1) if $help;
26
27if ( $debug ) {
28 $ENV{CATALYST_DEBUG} = 1;
29}
30
31if ( $oneshot ) {
32 $ENV{ENGINE_ONESHOT} = 1;
33}
34
35# This is require instead of use so that the above environment
36# variables can be set at runtime.
68e73c9f 37require StompTestApp;
38StompTestApp->run();
0a663589 39
401;
41
42=head1 NAME
43
44testapp_stomp.pl - Catalyst STOMP client
45
46=head1 SYNOPSIS
47
48testapp_stomp.pl [options]
49
50 Options:
51 -d -debug force debug mode
52 -? -help display this help and exits
53
54 See also:
55 perldoc Catalyst::Engine::Stomp
56 perldoc Catalyst::Manual
57 perldoc Catalyst::Manual::Intro
58
59=head1 DESCRIPTION
60
61Run a Catalyst STOMP client for this application.
62
63=cut