[Catalyst-commits] r12042 - Catalyst-Devel/1.00/branches/helper_refactor/share/script

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Thu Nov 26 23:22:26 GMT 2009


Author: t0m
Date: 2009-11-26 23:22:25 +0000 (Thu, 26 Nov 2009)
New Revision: 12042

Modified:
   Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_create.pl.tt
Log:
Actually switch the create script to new script style. Testing I did yesterday obviously lies

Modified: Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_create.pl.tt
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_create.pl.tt	2009-11-26 23:21:07 UTC (rev 12041)
+++ Catalyst-Devel/1.00/branches/helper_refactor/share/script/myapp_create.pl.tt	2009-11-26 23:22:25 UTC (rev 12042)
@@ -2,38 +2,10 @@
 
 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 -
+use Catalyst::ScriptRunner;
+Catalyst::ScriptRunner->run('[% name %]', 'Create');
 
-  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 );
-
 1;
 
 =head1 NAME




More information about the Catalyst-commits mailing list