1 package MooseX::Runnable::Invocation::Scheme::MooseX::Getopt;
4 around validate_class => sub {
8 around create_instance => sub {
9 my ($next, $self, $class, @args) = @_;
11 local @ARGV = @args; # ugly!
12 my $instance = $class->name->new_with_options();
14 my $more_args = $instance->extra_argv;
16 return ($instance, @$more_args);
19 # XXX: arounds that don't actually call $orig fuck up plugins. i
20 # think that's OK, mostly, but it's something to keep in mind...
28 MooseX::Runnable::Invocation::Scheme::MooseX::Getopt - run MX::Getopt classes
32 This role will be used by C<MooseX::Runnable::Invocation> to create an
33 instance of the class to be run with C<MooseX::Getopt>. Any args not
34 consumed by MX::Getopt will be passed to the class's run method.
36 (See the test C<t/basic-mx-getopt.t> for an example.)