Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: MooseX::GetOpt disable in role

by tobyink (Abbot)
on Jun 21, 2013 at 10:58 UTC ( #1040125=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package My::App;
    
    ...
    sub disable_getopt_attribute {
      has("+$_", traits => ['NoGetopt']) for @_;
    }
    
  2. or download this
    package My::Script;
    use Moose;
    with "My::App";
    My::App::disable_getopt_attribute(qw/ foo bar /);
    
  3. or download this
    package My::App;
    
    ...
      my $has   = $class->can("has");
      $has->("+$_", traits => ['NoGetopt']) for @_;
    }
    
  4. or download this
    package My::Script;
    use Moose;
    with "My::App";
    __PACKAGE__->disable_getopt_attribute(qw/ foo bar /);
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2015-07-29 08:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (261 votes), past polls