use Config;
use File::Spec;
use File::Path;
-use IO::File;
use FindBin;
+use IO::File;
+use POSIX 'strftime';
use Template;
use Catalyst::Devel;
use Catalyst::Utils;
my %cache;
-our $VERSION = '1.00';
=head1 NAME
=head1 DESCRIPTION
-Bootstrap a Catalyst application. Autogenerates scripts
+Bootstrap a Catalyst application. Autogenerates scripts.
=head2 METHODS
sub _mk_changes {
my $self = shift;
my $dir = $self->{dir};
- my $time = localtime time;
+ my $time = strftime('%Y-%m-%d %T', localtime time);
$self->render_file( 'changes', "$dir\/Changes", { time => $time } );
}
use Catalyst::Runtime '5.70';
-#
# Set flags and add plugins for the application
#
# -Debug: activates the debug mode for very useful log messages
# application's home directory
# Static::Simple: will serve static files from the application's root
# directory
-#
+
use Catalyst qw/-Debug ConfigLoader Static::Simple/;
our $VERSION = '0.01';
-#
# 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.
-#
+# Note that settings in [% name %].yml (or other external
+# configuration file that you set up manually) take precedence
+# over this when using ConfigLoader. Thus configuration
+# details given here can function as a default configuration,
+# with a external configuration file acting as an override for
+# local deployment.
+
__PACKAGE__->config( name => '[% name %]' );
-#
# Start the application
-#
__PACKAGE__->setup;
-#
-# IMPORTANT: Please look into [% rootname %] for more
-#
=head1 NAME
=head1 DESCRIPTION
-Catalyst based application.
+[enter your description here]
=head1 SEE ALSO
=head1 NAME
-[% rootname %] - Root Controller for this Catalyst based application
-
-=head1 SYNOPSIS
-
-See L<[% name %]>.
+[% rootname %] - Root Controller for [% name %]
=head1 DESCRIPTION
-Root Controller for this Catalyst based application.
+[enter your description here]
=head1 METHODS
=cut
-#
-# Output a friendly welcome message
-#
sub default : Private {
my ( $self, $c ) = @_;
$c->response->body( $c->welcome_message );
}
-#
-# Uncomment and modify this end action after adding a View component
-#
-#=head2 end
-#
-#=cut
-#
-#sub end : Private {
-# my ( $self, $c ) = @_;
-#
-# # Forward to View unless response body is already defined
-# $c->forward( $c->view('') ) unless $c->response->body;
-#}
+=head2 end
+
+Attempt to render a view, if needed.
+
+=cut
+
+sub end : ActionClass('RenderView') {}
=head1 AUTHOR
name '[% dir %]';
all_from '[% path %]';
-requires Catalyst => '[% catalyst_version %]';
-requires YAML; # This should reflect the config file format you've chosen
- # See Catalyst::Plugin::ConfigLoader for supported formats
+requires 'Catalyst' => '[% catalyst_version %]';
+requires 'Catalyst::Plugin::ConfigLoader';
+requires 'Catalyst::Plugin::Static::Simple';
+requires 'Catalyst::Action::RenderView';
+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');
=head1 DESCRIPTION
-Run a Catalyst application as cgi.
+Run a Catalyst application as a cgi script.
=head1 AUTHOR
=head1 COPYRIGHT
-Copyright 2004 Sebastian Riedel. All rights reserved.
This library is free software, you can redistribute it and/or modify
it under the same terms as Perl itself.
=head1 AUTHOR
Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
=head1 COPYRIGHT
-Copyright 2004 Sebastian Riedel. All rights reserved.
-
This library is free software, you can redistribute it and/or modify
it under the same terms as Perl itself.
-host host (defaults to all)
-p -port port (defaults to 3000)
-k -keepalive enable keep-alive connections
- -r -restart restart when files got modified
+ -r -restart restart when files get modified
(defaults to false)
-rd -restartdelay delay between file checks
-rr -restartregex regex match files that trigger
=head1 AUTHOR
Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
=head1 COPYRIGHT
-Copyright 2004 Sebastian Riedel. All rights reserved.
-
This library is free software, you can redistribute it and/or modify
it under the same terms as Perl itself.
=head1 AUTHOR
Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
=head1 COPYRIGHT
-Copyright 2004 Sebastian Riedel. All rights reserved.
-
This library is free software, you can redistribute it and/or modify
it under the same terms as Perl itself.
[% appprefix %]_create.pl view MyView TT
[% appprefix %]_create.pl view TT TT
[% appprefix %]_create.pl model My::Model
- [% appprefix %]_create.pl model SomeDB DBIC::SchemaLoader dbi:SQLite:/tmp/my.db
- [% appprefix %]_create.pl model AnotherDB DBIC::SchemaLoader dbi:Pg:dbname=foo root 4321
+ [% appprefix %]_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\
+ dbi:SQLite:/tmp/my.db
+ [% appprefix %]_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\
+ dbi:Pg:dbname=foo root 4321
See also:
perldoc Catalyst::Manual
=head1 AUTHOR
Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
=head1 COPYRIGHT
-Copyright 2004 Sebastian Riedel. All rights reserved.
-
This library is free software, you can redistribute it and/or modify
it under the same terms as Perl itself.
[% class %] - Catalyst [% long_type %]
-=head1 SYNOPSIS
-
-See L<[% app %]>
-
=head1 DESCRIPTION
Catalyst [% long_type %].
=cut
-#
-# Uncomment and modify this or add new actions to fit your needs
-#
-#=head2 default
-#
-#=cut
-#
-#sub default : Private {
-# my ( $self, $c ) = @_;
-#
-# # Hello World
-# $c->response->body('[% class %] is on Catalyst!');
-#}
+
+=head2 index
+
+=cut
+
+sub index : Private {
+ my ( $self, $c ) = @_;
+
+ $c->response->body('Matched [% class %] in [%name%].');
+}
[% END %]
=head1 AUTHOR