From: Brian Cassidy Date: Mon, 23 Aug 2010 17:55:43 +0000 (+0000) Subject: Fix two warnings: X-Git-Tag: 5.80026~7^2~13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=2d03a2997e2b76d4ee7df1c1db5597f91ab8ec5c Fix two warnings: - Fix warning about "excludes" during role application - Fix warning from MooseX::Getopt regarding duplicate "help" aliases --- diff --git a/Changes b/Changes index f17bba2..308a63a 100644 --- a/Changes +++ b/Changes @@ -14,6 +14,8 @@ - Fix controllers with no method attributes (where the action definitions are entirely contained in config). RT#58057 - Fix running as a CGI under IIS at non-root locations. + - Fix warning about "excludes" during role application + - Fix warning from MooseX::Getopt regarding duplicate "help" aliases Documentation: - Fix missing - in the docs when describing the --mechanize option at one diff --git a/Makefile.PL b/Makefile.PL index 6723040..ed91b4c 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -46,7 +46,7 @@ requires 'URI' => '1.35'; requires 'Task::Weaken'; requires 'Text::Balanced'; # core in 5.8.x but mentioned for completeness requires 'MRO::Compat'; -requires 'MooseX::Getopt' => '0.25'; +requires 'MooseX::Getopt' => '0.30'; requires 'MooseX::Types'; requires 'MooseX::Types::Common::Numeric'; requires 'String::RewritePrefix' => '0.004'; # Catalyst::Utils::resolve_namespace diff --git a/lib/Catalyst/Script/Server.pm b/lib/Catalyst/Script/Server.pm index 45156e3..bb4c2a5 100644 --- a/lib/Catalyst/Script/Server.pm +++ b/lib/Catalyst/Script/Server.pm @@ -13,8 +13,6 @@ use namespace::autoclean; with 'Catalyst::ScriptRole'; -__PACKAGE__->meta->get_attribute('help')->cmd_aliases('?'); - has debug => ( traits => [qw(Getopt)], cmd_aliases => 'd', diff --git a/lib/Catalyst/ScriptRole.pm b/lib/Catalyst/ScriptRole.pm index 535ed3d..7ae3d7d 100644 --- a/lib/Catalyst/ScriptRole.pm +++ b/lib/Catalyst/ScriptRole.pm @@ -6,7 +6,7 @@ use MooseX::Getopt; use namespace::autoclean; with 'MooseX::Getopt' => { - excludes => [qw/ + -excludes => [qw/ _getopt_spec_warnings _getopt_spec_exception _getopt_full_usage @@ -20,14 +20,6 @@ has application_name => ( required => 1, ); -has help => ( - traits => ['Getopt'], - isa => Bool, - is => 'ro', - documentation => 'Display this help and exit', - cmd_aliases => ['?', 'h'], -); - sub _getopt_spec_exception {} sub _getopt_spec_warnings { @@ -41,11 +33,6 @@ sub _getopt_full_usage { exit 0; } -before run => sub { - my $self = shift; - $self->_getopt_full_usage if $self->help; -}; - sub run { my $self = shift; $self->_run_application;