# Needs to be here for PAR
require Catalyst;
- if ( $name =~ /[^\w\:]/ ) {
+ if ( $name =~ /[^\w:]/ || $name =~ /^\d/ || $name =~ /\b:\b|:{3,}/) {
warn "Error: Invalid application name.\n";
return 0;
}
1;
__makefile__
+[% startperl %]
# IMPORTANT: if you delete this file your app will not work as
# expected. You have been warned.
use inc::Module::Install;
auto_install;
WriteAll;
__config__
-# rename this file to [% name %].yml and put a : in front of "name" if
-# you want to use yaml like in old versions of Catalyst
+# rename this file to [% name %].yml and put a ':' in front of 'name' if
+# you want to use YAML like in old versions of Catalyst
name [% name %]
__readme__
Run script/[% appprefix %]_server.pl to test the application.
0.01 [% time %]
- initial revision, generated by Catalyst
__apptest__
+[% startperl %]
use strict;
use warnings;
use Test::More tests => 2;
ok( request('/')->is_success, 'Request should succeed' );
__podtest__
+[% startperl %]
use strict;
use warnings;
use Test::More;
all_pod_files_ok();
__podcoveragetest__
+[% startperl %]
use strict;
use warnings;
use Test::More;
pidfile => $pidfile,
manager => $manager,
detach => $detach,
- keep_stderr => $keep_stderr,
+ keep_stderr => $keep_stderr,
}
);
};
if ( $restart ) {
- require Catalyst::Restarter;
-
die "Cannot run in the background and also watch for changed files.\n"
if $background;
+ require Catalyst::Restarter;
+
+ my $subclass = Catalyst::Restarter->pick_subclass;
+
my %args;
$args{follow_symlinks} = 1
if $follow_symlinks;
$args{filter} = qr/$file_regex/
if defined $file_regex;
- my $restarter = Catalyst::Restarter->new(
+ my $restarter = $subclass->new(
%args,
start_sub => $runner,
);