| 1 | package MouseX::Getopt::Strict; | ||
| 2 | # ABSTRACT: only make options for attrs with the Getopt metaclass | ||
| 3 | |||
| 4 | 1 | ▶ | use Mouse::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 1 | with 'MouseX::Getopt'; | |
| 7 | |||
| 8 | around '_compute_getopt_attrs' => sub { | ||
| 9 | 3 | ▶ | my $next = shift; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 10 | 3 | my ( $class, @args ) = @_; | |
| 11 | grep { | ||
| 12 | 3 | $_->does("MouseX::Getopt::Meta::Attribute::Trait") | |
| 13 | } $class->$next(@args); | ||
| 14 | 1 | }; | |
| 15 | |||
| 16 | 1 | ▶ | no Mouse::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | |||
| 18 | 1 | 1; | |
| 19 | |||
| 20 | =head1 DESCRIPTION | ||
| 21 | |||
| 22 | This is an stricter version of C<MouseX::Getopt> which only processes the | ||
| 23 | attributes if they explicitly set as C<Getopt> attributes. All other attributes | ||
| 24 | are ignored by the command line handler. | ||
| 25 | |||
| 26 | =cut | ||