1 |
dpavlin |
83 |
#!/usr/bin/perl -w |
2 |
|
|
|
3 |
|
|
use strict; |
4 |
|
|
use Getopt::Long; |
5 |
|
|
use Pod::Usage; |
6 |
|
|
use FindBin; |
7 |
|
|
use lib "$FindBin::Bin/../lib"; |
8 |
|
|
use Catalyst::Test 'Webpacus'; |
9 |
|
|
|
10 |
|
|
my $help = 0; |
11 |
|
|
|
12 |
|
|
GetOptions( 'help|?' => \$help ); |
13 |
|
|
|
14 |
|
|
pod2usage(1) if ( $help || !$ARGV[0] ); |
15 |
|
|
|
16 |
|
|
print request($ARGV[0])->content . "\n"; |
17 |
|
|
|
18 |
|
|
1; |
19 |
|
|
|
20 |
|
|
=head1 NAME |
21 |
|
|
|
22 |
|
|
webpacus_test.pl - Catalyst Test |
23 |
|
|
|
24 |
|
|
=head1 SYNOPSIS |
25 |
|
|
|
26 |
|
|
webpacus_test.pl [options] uri |
27 |
|
|
|
28 |
|
|
Options: |
29 |
|
|
-help display this help and exits |
30 |
|
|
|
31 |
|
|
Examples: |
32 |
|
|
webpacus_test.pl http://localhost/some_action |
33 |
|
|
webpacus_test.pl /some_action |
34 |
|
|
|
35 |
|
|
See also: |
36 |
|
|
perldoc Catalyst::Manual |
37 |
|
|
perldoc Catalyst::Manual::Intro |
38 |
|
|
|
39 |
|
|
=head1 DESCRIPTION |
40 |
|
|
|
41 |
|
|
Run a Catalyst action from the command line. |
42 |
|
|
|
43 |
|
|
=head1 AUTHOR |
44 |
|
|
|
45 |
|
|
Sebastian Riedel, C<sri@oook.de> |
46 |
|
|
|
47 |
|
|
=head1 COPYRIGHT |
48 |
|
|
|
49 |
|
|
Copyright 2004 Sebastian Riedel. All rights reserved. |
50 |
|
|
|
51 |
|
|
This library is free software, you can redistribute it and/or modify |
52 |
|
|
it under the same terms as Perl itself. |
53 |
|
|
|
54 |
|
|
=cut |