6 eval 'use Catalyst::Helper "1.0";';
7 die "Please install Catalyst::Helper!\n" if $@;
17 'force|nonew' => \$force,
18 'makefile' => \$makefile,
19 'scripts' => \$scripts,
23 pod2usage(1) if ( $help || !$ARGV[0] );
25 my $helper = Catalyst::Helper->new(
27 '.newfiles' => !$force,
28 'makefile' => $makefile,
29 'scripts' => $scripts,
33 pod2usage(1) unless $helper->mk_app( $ARGV[0] );
40 catalyst - Bootstrap a Catalyst application
44 catalyst.pl [options] application-name
46 'catalyst.pl' creates a skeleton for a new application, and allows you to
47 upgrade the skeleton of your old application.
50 -force don't create a .new file where a file to be created exists
51 -help display this help and exit
52 -makefile only update Makefile.PL
53 -scripts only update helper scripts
54 -short use short names, M/V/C instead of Model/View/Controller.
56 application-name must be a valid Perl module name and can include "::",
57 which will be converted to '-' in the project name.
64 To upgrade your app to a new version of Catalyst:
65 catalyst.pl -force -scripts MyApp
70 The C<catalyst.pl> script bootstraps a Catalyst application, creating a
71 directory structure populated with skeleton files.
73 The application name must be a valid Perl module name. The name of the
74 directory created is formed from the application name supplied, with double
75 colons replaced with hyphens (so, for example, the directory for C<My::App> is
78 Using the example application name C<My::App>, the application directory will
79 contain the following items:
85 a skeleton README file, which you are encouraged to expand on
89 a changes file with an initial entry for the creation of the application
93 Makefile.PL uses the C<Module::Install> system for packaging and distribution
98 contains the application module (C<My/App.pm>) and
99 subdirectories for model, view, and controller components (C<My/App/M>,
100 C<My/App/V>, and C<My/App/C>).
104 root directory for your web document content. This is left empty.
108 a directory containing helper scripts:
112 =item C<myapp_create.pl>
114 helper script to generate new component modules
116 =item C<myapp_server.pl>
118 runs the generated application within a Catalyst test server, which can be
119 used for testing without resorting to a full-blown web server configuration.
121 =item C<myapp_cgi.pl>
123 runs the generated application as a CGI script
125 =item C<myapp_fastcgi.pl>
127 runs the generated application as a FastCGI script
129 =item C<myapp_test.pl>
131 runs an action of the generated application from the comand line.
142 The application module generated by the C<catalyst.pl> script is functional,
143 although it reacts to all requests by outputting a friendly welcome screen.
148 Neither C<catalyst.pl> nor the generated helper script will overwrite existing
149 files. In fact the scripts will generate new versions of any existing files,
150 adding the extension C<.new> to the filename. The C<.new> file is not created
151 if would be identical to the existing file.
153 This means you can re-run the scripts for example to see if newer versions of
154 Catalyst or its plugins generate different code, or to see how you may have
155 changed the generated code (although you do of course have all your code in a
156 version control system anyway, don't you ...).
162 L<Catalyst::Manual>, L<Catalyst::Manual::Intro>
166 Sebastian Riedel, C<sri@oook.de>,
167 Andrew Ford, C<A.Ford@ford-mason.co.uk>
172 Copyright 2004-2005 Sebastian Riedel. All rights reserved.
174 This library is free software, you can redistribute it and/or modify it under
175 the same terms as Perl itself.