
Catalyst::Helper - Bootstrap a Catalyst application


Bootstrap a Catalyst application. Autogenerates scripts
Slurp file from DATA.
Create the main application skeleton.
This method is called by create.pl to make new components for your application.
Surprisingly, this function makes a directory.
writes content to a file.
Render and create a file from a template in DATA using Template Toolkit.

Helpers are classes that provide two methods.
* mk_compclass - creates the Component class
* mk_comptest - creates the Component test
So when you call bin/create view MyView TT, create would try to execute Catalyst::Helper::View::TT->mk_compclass and Catalyst::Helper::View::TT->mk_comptest.
See Catalyst::Helper::View::TT and Catalyst::Helper::Model::CDBI for examples.
All helper classes should be under one of the following namespaces.
Catalyst::Helper::Model::
Catalyst::Helper::View::
Catalyst::Helper::Controller::

The helpers will read author name from /etc/passwd by default. To override, please export the AUTHOR variable.

Catalyst::Manual, Catalyst::Test, Catalyst::Request, Catalyst::Response, Catalyst

Sebastian Riedel, sri@oook.de

This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.

[% name %] - Catalyst based application

script/[% appprefix %]_server.pl

Catalyst based application.


[% author %]

This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.

[% appprefix %]_cgi.pl - Catalyst CGI

See Catalyst::Manual

Run a Catalyst application as cgi.

Sebastian Riedel, sri@oook.de

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 %]_fastcgi.pl - Catalyst FastCGI

[% appprefix %]_fastcgi.pl [options]
Options:
-? -help display this help and exits
-l -listen Socket path to listen on
(defaults to standard input)
can be HOST:PORT, :PORT or a
filesystem path
-n -nproc specify number of processes to keep
to serve requests (defaults to 1)

Run a Catalyst application as fastcgi.

Sebastian Riedel, sri@oook.de

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 %]_server.pl - Catalyst Testserver

[% appprefix %]_server.pl [options]
Options:
-d -debug force debug mode
-f -fork handle each request in a new process
(defaults to false)
-? -help display this help and exits
-host host (defaults to all)
-p -port port (defaults to 3000)
-r -restart restart when files got modified
(defaults to false)
-rd -restartdelay delay between file checks
-rr -restartregex regex match files that trigger
a restart when modified
(defaults to '\.yml$|\.yaml$|\.pm$')
See also:
perldoc Catalyst::Manual
perldoc Catalyst::Manual::Intro

Run a Catalyst Testserver for this application.

Sebastian Riedel, sri@oook.de

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 %]_test.pl - Catalyst Test

[% appprefix %]_test.pl [options] uri
Options: -help display this help and exits Examples: [% appprefix %]_test.pl http://localhost/some_action [% appprefix %]_test.pl /some_action See also: perldoc Catalyst::Manual perldoc Catalyst::Manual::Intro

Run a Catalyst action from the command line.

Sebastian Riedel, sri@oook.de

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 - Create a new Catalyst Component

[% appprefix %]_create.pl [options] model|view|controller name [helper] [options]
Options: -help display this help and exits -nonew don't create a .new file where a file to be created exists -short use short types, like C instead of Controller... Examples: [% appprefix %]_create.pl controller My::Controller [% appprefix %]_create.pl view My::View [% appprefix %]_create.pl view MyView TT [% appprefix %]_create.pl view TT TT [% appprefix %]_create.pl model My::Model [% appprefix %]_create.pl model SomeDB CDBI dbi:SQLite:/tmp/my.db [% appprefix %]_create.pl model AnotherDB CDBI dbi:Pg:dbname=foo root 4321 See also: perldoc Catalyst::Manual perldoc Catalyst::Manual::Intro

Create a new Catalyst Component.
Existing component files are not overwritten. If any of the component files to be created already exist the file will be written with a '.new' suffix. This behavior can be suppressed with the -nonew option.

Sebastian Riedel, sri\@oook.de

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 %]

See "[% app %]"

Catalyst [% long_type %]. [% IF long_type == 'Controller' %] =head1 METHODS
# # Uncomment and modify this or add new actions to fit your needs # #=item default # #=cut # #sub default : Private { # my ( $self, $c ) = @_; # # # Hello World # $c->response->body('[% class %] is on Catalyst!'); #}
[% END %] =head1 AUTHOR
[%author%]

This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.