X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FGetopt%2FStrict.pm;h=8d9d2b7a69219ae993c64f2f311c76effced9881;hb=refs%2Fheads%2Ftopic%2Fdams_getopt_conf;hp=33ca1e0518d4b2dd89becf7bb4020b533c6421ef;hpb=0f8232b66e0f72e35099ce203962a4efc23838cf;p=gitmo%2FMooseX-Getopt.git diff --git a/lib/MooseX/Getopt/Strict.pm b/lib/MooseX/Getopt/Strict.pm index 33ca1e0..8d9d2b7 100644 --- a/lib/MooseX/Getopt/Strict.pm +++ b/lib/MooseX/Getopt/Strict.pm @@ -1,60 +1,29 @@ - package MooseX::Getopt::Strict; +# ABSTRACT: only make options for attrs with the Getopt metaclass + use Moose::Role; -with 'MooseX::Getopt'; +with 'MooseX::Getopt' => { getopt_conf => [] }; around '_compute_getopt_attrs' => sub { my $next = shift; my ( $class, @args ) = @_; - grep { - $_->isa("MooseX::Getopt::Meta::Attribute") + grep { + $_->does("MooseX::Getopt::Meta::Attribute::Trait") } $class->$next(@args); }; -1; - -__END__ - -=pod +no Moose::Role; -=head1 NAME +1; -MooseX::Getopt::Strict - only make options for attrs with the Getopt metaclass - =head1 DESCRIPTION -This is an stricter version of C which only processes the +This is an stricter version of C which only processes the attributes if they explicitly set as C attributes. All other attributes are ignored by the command line handler. - -=head1 METHODS - -=over 4 - -=item meta - -=back - -=head1 BUGS - -All complex software has bugs lurking in it, and this module is no -exception. If you find a bug please either email me, or add the bug -to cpan-RT. - -=head1 AUTHOR - -Stevan Little Estevan@iinteractive.comE - -Yuval Kogman C<< >> - -=head1 COPYRIGHT AND LICENSE - -Copyright 2007 by Infinity Interactive, Inc. - -L -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. +Also, no L global option is activated. Especially, 'pass_through' is +not set. =cut