Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^2: MooseX::GetOpt disable in role

by markjugg (Curate)
on Aug 06, 2013 at 19:25 UTC ( #1048169=note: print w/ replies, xml ) Need Help??

in reply to Re: MooseX::GetOpt disable in role
in thread MooseX::GetOpt disable in role

If you always want to disable the same attributes for MooseX::Getopt from your role, then this worked for me:

package My::Role::Getopt { use Moose::Role; with 'My::Role::DB'; with 'My::Role::Log'; with 'MooseX::Getopt::Dashes'; before 'process_argv' => sub { my $self = shift; my @attrs_to_exclude_from_getopt = ( '+db', ... ); for my $attr (@attrs_to_exclude_from_getopt) { $self->meta->add_attribute($attr => (traits => ['NoGetopt' +])); } }; no Moose::Role; }

Comment on Re^2: MooseX::GetOpt disable in role
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1048169]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2015-11-29 01:57 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (746 votes), past polls