Revert "work with MooseX::Getopt 0.48 by using the new public method for printing...
Tomas Doran [Fri, 4 Jan 2013 08:24:42 +0000 (08:24 +0000)]
This reverts commit cd61f3ab24b7dcc59068c35d62ddb4bb9b9162c8.

lib/Catalyst/Script/Create.pm
lib/Catalyst/ScriptRole.pm
t/aggregate/unit_core_script_create.t
t/aggregate/unit_core_script_help.t

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