Get useful help about which option you fucked up back
Tomas Doran [Thu, 26 Nov 2009 00:25:01 +0000 (00:25 +0000)]
Makefile.PL
TODO.scripts
lib/Catalyst/ScriptRole.pm

index 790e8f8..ccb2a19 100644 (file)
@@ -48,7 +48,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';
+requires 'MooseX::Getopt' => '0.25';
 requires 'MooseX::Types';
 requires 'String::RewritePrefix' => '0.004'; # Catalyst::Utils::resolve_namespace
 
index f55544d..50af8dd 100644 (file)
@@ -1,2 +1,2 @@
-* Sort out help so that it shows what you fucked up.
-* Fix horrible hacking around MX::Getopt's help display - probably by fixing MX::Getopt.
+* Fix the horrible hacking that is Catalyst::ScriptRole::Useage
+* Fix TODO tests
index bb1b7ad..9e67685 100644 (file)
@@ -5,7 +5,12 @@ use Pod::Usage;
 use MooseX::Getopt;
 use namespace::autoclean;
 
-with 'MooseX::Getopt';
+with 'MooseX::Getopt' => {
+    excludes => [qw/
+        _getopt_spec_warnings
+        _getopt_spec_exception
+    /],
+};
 
 has application_name => (
     traits => ['NoGetopt'],
@@ -21,6 +26,13 @@ has help => (
     documentation => q{Display this help and exit},
 );
 
+sub _getopt_spec_exception {}
+
+sub _getopt_spec_warnings {
+    shift;
+    warn @_;
+}
+
 sub _exit_with_usage {
     my $self = shift;
     pod2usage();