make ::Strict work with the trait stuff
[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;
bff3807b 9 my ( $class, @args ) = @_;
eb404494 10 grep {
11 $_->does("MooseX::Getopt::Meta::Attribute::Trait")
0f8232b6 12 } $class->$next(@args);
13};
bff3807b 14
0f8232b6 151;
bff3807b 16
17__END__
18
19=pod
20
21=head1 NAME
22
23MooseX::Getopt::Strict - only make options for attrs with the Getopt metaclass
0f8232b6 24
25=head1 DESCRIPTION
bff3807b 26
0f8232b6 27This is an stricter version of C<MooseX::Getopt> which only processes the
28attributes if they explicitly set as C<Getopt> attributes. All other attributes
29are 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 41All complex software has bugs lurking in it, and this module is no
42exception. If you find a bug please either email me, or add the bug
43to cpan-RT.
44
45=head1 AUTHOR
46
47Stevan Little E<lt>stevan@iinteractive.comE<gt>
48
49Yuval Kogman C<< <nuffin@cpan.org> >>
50
51=head1 COPYRIGHT AND LICENSE
52
adbe3e57 53Copyright 2007-2008 by Infinity Interactive, Inc.
0f8232b6 54
55L<http://www.iinteractive.com>
56
57This library is free software; you can redistribute it and/or modify
58it under the same terms as Perl itself.
bff3807b 59
60=cut