Get useful help about which option you fucked up back
[catagits/Catalyst-Runtime.git] / lib / Catalyst / ScriptRole.pm
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();