X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=share%2Fscript%2Fmyapp_create.pl.tt;h=ced979fa88931e468c557356527e1a69c7732973;hb=4b62c0d0306fd05b0e9abaa1115dcb278aeb28d3;hp=cb5a19cb92c379e2d8a71ae87c4139ba865ca0d0;hpb=a363c0aaaaa5be119b12a440e2e6f6533300499a;p=catagits%2FCatalyst-Devel.git diff --git a/share/script/myapp_create.pl.tt b/share/script/myapp_create.pl.tt index cb5a19c..ced979f 100644 --- a/share/script/myapp_create.pl.tt +++ b/share/script/myapp_create.pl.tt @@ -2,37 +2,9 @@ use strict; use warnings; -use Getopt::Long; -use Pod::Usage; -eval "use Catalyst::Helper;"; -if ($@) { - die < \$force, - 'mech|mechanize' => \$mech, - 'help|?' => \$help - ); - -pod2usage(1) if ( $help || !$ARGV[0] ); - -my $helper = Catalyst::Helper->new( { '.newfiles' => !$force, mech => $mech } ); - -pod2usage(1) unless $helper->mk_component( '[% name %]', @ARGV ); +use Catalyst::ScriptRunner; +Catalyst::ScriptRunner->run('[% name %]', 'Create'); 1; @@ -53,17 +25,20 @@ pod2usage(1) unless $helper->mk_component( '[% name %]', @ARGV ); [% appprefix %]_create.pl controller My::Controller [% appprefix %]_create.pl -mechanize controller My::Controller [% appprefix %]_create.pl view My::View - [% appprefix %]_create.pl view MyView TT - [% appprefix %]_create.pl view TT TT + [% appprefix %]_create.pl view HTML TT [% appprefix %]_create.pl model My::Model [% 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 + [Loader opts like db_schema, naming] dbi:Pg:dbname=foo root 4321 + [connect_info opts like quote_char, name_sep] See also: perldoc Catalyst::Manual perldoc Catalyst::Manual::Intro + perldoc Catalyst::Helper::Model::DBIC::Schema + perldoc Catalyst::Model::DBIC::Schema + perldoc Catalyst::View::TT =head1 DESCRIPTION