use Catalyst::Build;
my $build = Catalyst::Build->new(
- create_makefile_pl => 'passthrough',
license => 'perl',
module_name => '[% name %]',
requires => { Catalyst => '5.49' },
use [% name %];
my $help = 0;
-my ( $listen, $nproc );
+my ( $listen, $nproc, $pidfile );
GetOptions(
- 'help|?' => \$help,
- 'listen|l=s' => \$listen,
- 'nproc|n=i' => \$nproc,
+ 'help|?' => \$help,
+ 'listen|l=s' => \$listen,
+ 'nproc|n=i' => \$nproc,
+ 'pidfile|p=s' => \$pidfile,
);
pod2usage(1) if $help;
-[% name %]->run( $listen, { nproc => $nproc } );
+[% name %]->run(
+ $listen,
+ { nproc => $nproc,
+ pidfile => $pidfile,
+ }
+);
1;
__test__
[% startperl %] -w
-BEGIN { $ENV{CATALYST_ENGINE} ||= 'Test' }
-
use strict;
use Getopt::Long;
use Pod::Usage;
use FindBin;
use lib "$FindBin::Bin/../lib";
-use [% name %];
+use Catalyst::Test '[% name %]';
my $help = 0;
pod2usage(1) if ( $help || !$ARGV[0] );
-print [% name %]->run($ARGV[0])->content . "\n";
+print request($ARGV[0])->content . "\n";
1;