Fix two warnings:
Brian Cassidy [Mon, 23 Aug 2010 17:55:43 +0000 (17:55 +0000)]
- Fix warning about "excludes" during role application
- Fix warning from MooseX::Getopt regarding duplicate "help" aliases

Changes
Makefile.PL
lib/Catalyst/Script/Server.pm
lib/Catalyst/ScriptRole.pm

diff --git a/Changes b/Changes
index f17bba2..308a63a 100644 (file)
--- 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
index 6723040..ed91b4c 100644 (file)
@@ -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
index 45156e3..bb4c2a5 100644 (file)
@@ -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',
index 535ed3d..7ae3d7d 100644 (file)
@@ -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;