requires 'namespace::autoclean';
requires 'Config::General'; # This should reflect the config file format you've chosen
# See Catalyst::Plugin::ConfigLoader for supported formats
+test_requires 'Test::More' => '0.88';
catalyst;
install_script glob('script/*.pl');
# Static::Simple: will serve static files from the application's root
# directory
-use Catalyst qw/-Debug
- ConfigLoader
- Static::Simple/;
+use Catalyst qw/
+ -Debug
+ ConfigLoader
+ Static::Simple
+/;
extends 'Catalyst';
our $VERSION = '0.01';
+$VERSION = eval $VERSION;
# Configure the application.
#
# with an external configuration file acting as an override for
# local deployment.
-__PACKAGE__->config( name => '[% name %]' );
+__PACKAGE__->config(
+ name => '[% name %]',
+ # Disable deprecated behavior needed by old applications
+ disable_component_resolution_regex_fallback => 1,
+);
# Start the application
__PACKAGE__->setup();
[% startperl %]
use strict;
use warnings;
-use Test::More tests => 2;
+use Test::More;
BEGIN { use_ok 'Catalyst::Test', '[% name %]' }
ok( request('/')->is_success, 'Request should succeed' );
+
+done_testing();
[% IF long_type == 'Controller' %][% IF mech %]use Test::More;
eval "use Test::WWW::Mechanize::Catalyst '[% name %]'";
-plan $@
- ? ( skip_all => 'Test::WWW::Mechanize::Catalyst required' )
- : ( tests => 2 );
+if ($@) {
+ plan skip_all => 'Test::WWW::Mechanize::Catalyst required';
+ exit 0;
+}
ok( my $mech = Test::WWW::Mechanize::Catalyst->new, 'Created mech object' );
BEGIN { use_ok '[% class %]' }
[% END %]
+
+done_testing();