X-Git-Url: https://ruin.nu/git/?p=ndwebbie.git;a=blobdiff_plain;f=script%2Fndweb_create.pl;h=11668e760b23f975b555b566687d55f2ebf33bb5;hp=9293c49a5ba92cf0f4e35541a75097e7e50edb36;hb=c018a7ccbb1fd8bdec5c8f97b151686ae933870b;hpb=e4bc2f39c57c25dacc316a602e8d0280b4fbcce7 diff --git a/script/ndweb_create.pl b/script/ndweb_create.pl index 9293c49..11668e7 100755 --- a/script/ndweb_create.pl +++ b/script/ndweb_create.pl @@ -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( 'NDWeb', @ARGV ); +use Catalyst::ScriptRunner; +Catalyst::ScriptRunner->run('NDWeb', 'Create'); 1; @@ -45,9 +17,9 @@ ndweb_create.pl - Create a new Catalyst Component ndweb_create.pl [options] model|view|controller name [helper] [options] Options: - -force don't create a .new file where a file to be created exists - -mechanize use Test::WWW::Mechanize::Catalyst for tests if available - -help display this help and exits + --force don't create a .new file where a file to be created exists + --mechanize use Test::WWW::Mechanize::Catalyst for tests if available + --help display this help and exits Examples: ndweb_create.pl controller My::Controller