Updated helper templates
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Helper.pm
index 3dabe5b..5288ed2 100644 (file)
@@ -535,7 +535,7 @@ sub default : Private {
 #    my ( $self, $c ) = @_;
 #
 #    # Forward to View unless response body is already defined
-#    $c->forward('MyApp::V::') unless $c->response->body;
+#    $c->forward('View::') unless $c->response->body;
 #}
 
 =back
@@ -590,7 +590,7 @@ my $build = Catalyst::Build->new(
     create_makefile_pl => 'passthrough',
     license            => 'perl',
     module_name        => '[% name %]',
-    requires           => { Catalyst => '5.10' },
+    requires           => { Catalyst => '5.49' },
     create_makefile_pl => 'passthrough',
     script_files       => [ glob('script/*') ],
     test_files         => [ glob('t/*.t'), glob('t/*/*.t') ]
@@ -734,7 +734,6 @@ use Getopt::Long;
 use Pod::Usage;
 use FindBin;
 use lib "$FindBin::Bin/../lib";
-use [% name %];
 
 my $fork          = 0;
 my $help          = 0;
@@ -758,6 +757,12 @@ GetOptions(
 
 pod2usage(1) if $help;
 
+if ( $restart ) {
+    $ENV{CATALYST_ENGINE} = 'HTTP::Restarter';
+}
+
+require [% name %];
+
 [% name %]->run( $port, $host, {
     argv   => \@argv,
     'fork' => $fork,