update help for myapp_create.pl
[catagits/Catalyst-Devel.git] / share / script / myapp_create.pl.tt
index cb5a19c..ced979f 100644 (file)
@@ -2,37 +2,9 @@
 
 use strict;
 use warnings;
-use Getopt::Long;
-use Pod::Usage;
-eval "use Catalyst::Helper;";
 
-if ($@) {
-  die <<END;
-To use the Catalyst development tools including catalyst.pl and the
-generated script/myapp_create.pl you need Catalyst::Helper, which is
-part of the Catalyst-Devel distribution. Please install this via a
-vendor package or by running one of -
-
-  perl -MCPAN -e 'install Catalyst::Devel'
-  perl -MCPANPLUS -e 'install Catalyst::Devel'
-END
-}
-
-my $force = 0;
-my $mech  = 0;
-my $help  = 0;
-
-GetOptions(
-    'nonew|force'    => \$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