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