use strict;
use base 'Class::Accessor::Fast';
+use Config;
use File::Spec;
use File::Path;
use IO::File;
$self->{dir} =~ s/\:\:/-/g;
$self->{script} = File::Spec->catdir( $self->{dir}, 'script' );
$self->{appprefix} = Catalyst::Utils::appprefix($name);
- $self->{startperl} = '#!/usr/bin/perl -w';
+ $self->{startperl} = "#!$Config{perlpath} -w";
$self->{scriptgen} = $Catalyst::CATALYST_SCRIPT_GEN || 4;
$self->{author} = $self->{author} = $ENV{'AUTHOR'}
|| eval { @{ [ getpwuid($<) ] }[6] }
$self->_mk_test;
$self->_mk_create;
}
- return 1;
+ return $self->{dir};
}
=head3 mk_component
$self->{author} = $self->{author} = $ENV{'AUTHOR'}
|| eval { @{ [ getpwuid($<) ] }[6] }
|| 'A clever guy';
- $self->{base} = File::Spec->catdir( $FindBin::Bin, '..' );
+ $self->{base} ||= File::Spec->catdir( $FindBin::Bin, '..' );
unless ( $_[0] =~ /^(?:model|view|controller)$/i ) {
my $helper = shift;
my @args = @_;
=head1 METHODS
+=cut
+
=head2 default
=cut
version_from('[% path %]');
license('perl');
-requires( Catalyst => '5.57' );
+include('ExtUtils::AutoInstall');
-install_script( glob('script/*.pl') );
+requires( Catalyst => '5.60' );
catalyst_files();
+install_script( glob('script/*.pl') );
+auto_install();
&WriteAll;
__readme__
Run script/[% appprefix %]_server.pl to test the application.
- initial revision, generated by Catalyst
__apptest__
use Test::More tests => 2;
-use_ok( Catalyst::Test, '[% name %]' );
+BEGIN { use_ok( Catalyst::Test, '[% name %]' ); }
ok( request('/')->is_success );
__podtest__
$ENV{CATALYST_DEBUG} = 1;
}
+# This is require instead of use so that the above environment
+# variables can be set at runtime.
require [% name %];
[% name %]->run( $port, $host, {