Fix RT#52630
Tomas Doran [Thu, 10 Dec 2009 09:46:10 +0000 (09:46 +0000)]
Changes
lib/Catalyst/Script/Create.pm
t/aggregate/unit_core_script_create.t

diff --git a/Changes b/Changes
index b0b442e..c0f84c4 100644 (file)
--- a/Changes
+++ b/Changes
@@ -13,6 +13,7 @@
      some apache versions where %ENV{SCRIPT_NAME} is set to the real name of
      the script, by using $ENV{REDIRECT_URL} which contains the non-rewritten
      URI.
+   - Fix usage display when myapp_create.pl is run with no arguments. RT#52630
 
   New features:
    - The __MOP__ hash element is suppressed from being dumped fully
index 7d318fe..05b4a66 100644 (file)
@@ -40,13 +40,13 @@ sub _build_helper_class { 'Catalyst::Helper' }
 sub run {
     my ($self) = @_;
 
-    $self->_exit_with_usage if !$self->ARGV->[0];
+    $self->_getopt_full_usage if !$self->ARGV->[0];
 
     my $helper_class = $self->helper_class;
     Class::MOP::load_class($helper_class);
     my $helper = $helper_class->new( { '.newfiles' => !$self->force, mech => $self->mechanize } );
 
-    $self->_exit_with_usage unless $helper->mk_component( $self->application_name, @ARGV );
+    $self->_getopt_full_usage unless $helper->mk_component( $self->application_name, @ARGV );
 
 }
 
index 588cfd5..68e2458 100644 (file)
@@ -12,7 +12,7 @@ use lib "$Bin/../lib";
     use Moose;
     extends 'Catalyst::Script::Create';
     our $help;
-    sub _exit_with_usage { $help++ }
+    sub _getopt_full_usage { $help++ }
 }
 
 {