7 eval "use Catalyst::Helper;";
11 To use the Catalyst development tools including catalyst.pl and the
12 generated script/myapp_create.pl you need Catalyst::Helper, which is
13 part of the Catalyst-Devel distribution. Please install this via a
14 vendor package or by running one of -
16 perl -MCPAN -e 'install Catalyst::Devel'
17 perl -MCPANPLUS -e 'install Catalyst::Devel'
26 'nonew|force' => \$force,
27 'mech|mechanize' => \$mech,
31 pod2usage(1) if ( $help || !$ARGV[0] );
33 my $helper = Catalyst::Helper->new( { '.newfiles' => !$force, mech => $mech } );
35 pod2usage(1) unless $helper->mk_component( 'TestApp', @ARGV );
41 testapp_create.pl - Create a new Catalyst Component
45 testapp_create.pl [options] model|view|controller name [helper] [options]
48 -force don't create a .new file where a file to be created exists
49 -mechanize use Test::WWW::Mechanize::Catalyst for tests if available
50 -help display this help and exits
53 testapp_create.pl controller My::Controller
54 testapp_create.pl -mechanize controller My::Controller
55 testapp_create.pl view My::View
56 testapp_create.pl view MyView TT
57 testapp_create.pl view TT TT
58 testapp_create.pl model My::Model
59 testapp_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\
61 testapp_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\
62 dbi:Pg:dbname=foo root 4321
65 perldoc Catalyst::Manual
66 perldoc Catalyst::Manual::Intro
70 Create a new Catalyst Component.
72 Existing component files are not overwritten. If any of the component files
73 to be created already exist the file will be written with a '.new' suffix.
74 This behavior can be suppressed with the C<-force> option.
78 Catalyst Contributors, see Catalyst.pm
82 This library is free software. You can redistribute it and/or modify
83 it under the same terms as Perl itself.