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