Merge remote branch 'origin/topic/template-remove-critic-violation'
[catagits/Catalyst-Devel.git] / share / script / myapp_test.pl.tt
index e5cd5e0..8929202 100644 (file)
@@ -1,20 +1,7 @@
 [% startperl %]
 
-use strict;
-use warnings;
-use Getopt::Long;
-use Pod::Usage;
-use FindBin;
-use lib "$FindBin::Bin/../lib";
-use Catalyst::Test '[% name %]';
-
-my $help = 0;
-
-GetOptions( 'help|?' => \$help );
-
-pod2usage(1) if ( $help || !$ARGV[0] );
-
-print request($ARGV[0])->content . "\n";
+use Catalyst::ScriptRunner;
+Catalyst::ScriptRunner->run('[% name %]', 'Test');
 
 1;
 
@@ -27,7 +14,7 @@ print request($ARGV[0])->content . "\n";
 [% appprefix %]_test.pl [options] uri
 
  Options:
-   -help    display this help and exits
+   --help    display this help and exits
 
  Examples:
    [% appprefix %]_test.pl http://localhost/some_action