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