package Catalyst::Helper;
use strict;
+use warnings;
use base 'Class::Accessor::Fast';
use Config;
use File::Spec;
my %cache;
+our $VERSION = '1.00';
+
=head1 NAME
Catalyst::Helper - Bootstrap a Catalyst application
warn "Error: Invalid application name.\n";
return 0;
}
- $self->{name} = $name;
- $self->{dir} = $name;
- $self->{dir} =~ s/\:\:/-/g;
- $self->{script} = File::Spec->catdir( $self->{dir}, 'script' );
- $self->{appprefix} = Catalyst::Utils::appprefix($name);
- $self->{startperl} = "#!$Config{perlpath} -w";
- $self->{scriptgen} = $Catalyst::CATALYST_SCRIPT_GEN || 4;
- $self->{author} = $self->{author} = $ENV{'AUTHOR'}
+ $self->{name } = $name;
+ $self->{dir } = $name;
+ $self->{dir } =~ s/\:\:/-/g;
+ $self->{script } = File::Spec->catdir( $self->{dir}, 'script' );
+ $self->{appprefix } = Catalyst::Utils::appprefix($name);
+ $self->{startperl } = "#!$Config{perlpath} -w";
+ $self->{scriptgen } = $Catalyst::CATALYST_SCRIPT_GEN || 4;
+ $self->{catalyst_version} = $Catalyst::VERSION;
+ $self->{author } = $self->{author} = $ENV{'AUTHOR'}
|| eval { @{ [ getpwuid($<) ] }[6] }
|| 'Catalyst developer';
This library is free software, you can redistribute it and/or modify
it under the same terms as Perl itself.
+=begin pod_to_ignore
+
=cut
1;
use strict;
use warnings;
+use Catalyst::Runtime '5.70';
+
#
# Set flags and add plugins for the application
#
our $VERSION = '0.01';
#
-# Configure the application
+# Configure the application.
+#
+# Note that settings in [% name %].yml take precedence over
+# this when using ConfigLoader. Thus configuration details
+# given here can function as a default configuration, with a
+# YAML file acting as an override for local deployment.
#
__PACKAGE__->config( name => '[% name %]' );
name '[% dir %]';
all_from '[% path %]';
-requires Catalyst => '5.64';
-
+requires Catalyst => '[% catalyst_version %]';
+requires YAML; # This should reflect the config file format you've chosen
+ # See Catalyst::Plugin::ConfigLoader for supported formats
catalyst;
install_script glob('script/*.pl');
BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' }
use strict;
+use warnings;
use FindBin;
use lib "$FindBin::Bin/../lib";
use [% name %];
BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' }
use strict;
+use warnings;
use Getopt::Long;
use Pod::Usage;
use FindBin;
}
use strict;
+use warnings;
use Getopt::Long;
use Pod::Usage;
use FindBin;
[% startperl %]
use strict;
+use warnings;
use Getopt::Long;
use Pod::Usage;
use FindBin;
[% startperl %]
use strict;
+use warnings;
use Getopt::Long;
use Pod::Usage;
use Catalyst::Helper;