Commit | Line | Data |
---|---|---|
bff3807b | 1 | |
2 | package MooseX::Getopt::Strict; | |
3 | use Moose::Role; | |
4 | ||
f969917f | 5 | with 'MooseX::Getopt'; |
bff3807b | 6 | |
0f8232b6 | 7 | around '_compute_getopt_attrs' => sub { |
8 | my $next = shift; | |
bff3807b | 9 | my ( $class, @args ) = @_; |
f969917f | 10 | grep { |
11 | $_->isa("MooseX::Getopt::Meta::Attribute") | |
0f8232b6 | 12 | } $class->$next(@args); |
13 | }; | |
bff3807b | 14 | |
0f8232b6 | 15 | 1; |
bff3807b | 16 | |
17 | __END__ | |
18 | ||
19 | =pod | |
20 | ||
21 | =head1 NAME | |
22 | ||
23 | MooseX::Getopt::Strict - only make options for attrs with the Getopt metaclass | |
0f8232b6 | 24 | |
25 | =head1 DESCRIPTION | |
bff3807b | 26 | |
0f8232b6 | 27 | This is an stricter version of C<MooseX::Getopt> which only processes the |
28 | attributes if they explicitly set as C<Getopt> attributes. All other attributes | |
29 | are ignored by the command line handler. | |
30 | ||
31 | =head1 METHODS | |
bff3807b | 32 | |
33 | =over 4 | |
34 | ||
35 | =item meta | |
36 | ||
0f8232b6 | 37 | =back |
bff3807b | 38 | |
0f8232b6 | 39 | =head1 BUGS |
bff3807b | 40 | |
0f8232b6 | 41 | All complex software has bugs lurking in it, and this module is no |
42 | exception. If you find a bug please either email me, or add the bug | |
43 | to cpan-RT. | |
44 | ||
45 | =head1 AUTHOR | |
46 | ||
47 | Stevan Little E<lt>stevan@iinteractive.comE<gt> | |
48 | ||
49 | Yuval Kogman C<< <nuffin@cpan.org> >> | |
50 | ||
51 | =head1 COPYRIGHT AND LICENSE | |
52 | ||
adbe3e57 | 53 | Copyright 2007-2008 by Infinity Interactive, Inc. |
0f8232b6 | 54 | |
55 | L<http://www.iinteractive.com> | |
56 | ||
57 | This library is free software; you can redistribute it and/or modify | |
58 | it under the same terms as Perl itself. | |
bff3807b | 59 | |
60 | =cut |