work with MooseX::Getopt 0.48 by using the new public method for printing usage
Karen Etheridge [Thu, 27 Dec 2012 08:25:01 +0000 (00:25 -0800)]
lib/Catalyst/Script/Create.pm
lib/Catalyst/ScriptRole.pm
t/aggregate/unit_core_script_create.t
t/aggregate/unit_core_script_help.t

index 1308acd..593323d 100644 (file)
@@ -39,13 +39,13 @@ sub _build_helper_class { 'Catalyst::Helper' }
 sub run {
     my ($self) = @_;
 
-    $self->_getopt_full_usage if !$self->ARGV->[0];
+    $self->print_usage_text 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->_getopt_full_usage unless $helper->mk_component( $self->application_name, @{$self->extra_argv} );
+    $self->print_usage_text unless $helper->mk_component( $self->application_name, @{$self->extra_argv} );
 
 }
 
index b1ddc27..50949c7 100644 (file)
@@ -17,7 +17,7 @@ with 'MooseX::Getopt' => {
     -excludes => [qw/
         _getopt_spec_warnings
         _getopt_spec_exception
-        _getopt_full_usage
+        print_usage_text
     /],
 };
 
@@ -56,7 +56,7 @@ sub _getopt_spec_warnings {
     warn @_;
 }
 
-sub _getopt_full_usage {
+sub print_usage_text {
     my $self = shift;
     pod2usage();
     exit 0;
index 68e2458..d492fd9 100644 (file)
@@ -12,7 +12,7 @@ use lib "$Bin/../lib";
     use Moose;
     extends 'Catalyst::Script::Create';
     our $help;
-    sub _getopt_full_usage { $help++ }
+    sub print_usage_text { $help++ }
 }
 
 {
index d3a6fab..00d24da 100644 (file)
@@ -12,7 +12,7 @@ use lib "$Bin/../lib";
     use Moose;
     with 'Catalyst::ScriptRole';
     our $help;
-    sub _getopt_full_usage { $help++ }
+    sub print_usage_text { $help++ }
 }
 
 test('--help');