From: Tomas Doran Date: Fri, 4 Jan 2013 08:24:42 +0000 (+0000) Subject: Revert "work with MooseX::Getopt 0.48 by using the new public method for printing... X-Git-Tag: 5.90020~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=f831720babc4818823ec8628dcc1bd032ed8220c Revert "work with MooseX::Getopt 0.48 by using the new public method for printing usage" This reverts commit cd61f3ab24b7dcc59068c35d62ddb4bb9b9162c8. --- diff --git a/lib/Catalyst/Script/Create.pm b/lib/Catalyst/Script/Create.pm index 593323d..1308acd 100644 --- a/lib/Catalyst/Script/Create.pm +++ b/lib/Catalyst/Script/Create.pm @@ -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} ); } diff --git a/lib/Catalyst/ScriptRole.pm b/lib/Catalyst/ScriptRole.pm index 50949c7..b1ddc27 100644 --- a/lib/Catalyst/ScriptRole.pm +++ b/lib/Catalyst/ScriptRole.pm @@ -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; diff --git a/t/aggregate/unit_core_script_create.t b/t/aggregate/unit_core_script_create.t index d492fd9..68e2458 100644 --- a/t/aggregate/unit_core_script_create.t +++ b/t/aggregate/unit_core_script_create.t @@ -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++ } } { diff --git a/t/aggregate/unit_core_script_help.t b/t/aggregate/unit_core_script_help.t index 00d24da..d3a6fab 100644 --- a/t/aggregate/unit_core_script_help.t +++ b/t/aggregate/unit_core_script_help.t @@ -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');