-
package MooseX::Getopt::Strict;
+# ABSTRACT: only make options for attrs with the Getopt metaclass
+
use Moose::Role;
with 'MooseX::Getopt';
-sub _compute_getopt_attrs {
+around '_compute_getopt_attrs' => sub {
+ my $next = shift;
my ( $class, @args ) = @_;
- grep {
- $_->isa("MooseX::Getopt::Meta::Attribute")
- } $class->MooseX::Getopt::_compute_getopt_attrs(@args);
-}
-
-__PACKAGE__;
-
-__END__
-
-=pod
-
-=head1 NAME
-
-MooseX::Getopt::Strict - only make options for attrs with the Getopt metaclass
-
-=head1 SYNOPSIS
-
- # see MooseX::Getopt
-
-=over 4
+ grep {
+ $_->does("MooseX::Getopt::Meta::Attribute::Trait")
+ } $class->$next(@args);
+};
-=item meta
+no Moose::Role;
-Is a section devoted to making the #!#%^ stupid pod coverage test pass. Stevan, I do
-hope you're actually reading this.
+1;
-Love,
-Yuval
+=head1 DESCRIPTION
-=back
+This is an stricter version of C<MooseX::Getopt> which only processes the
+attributes if they explicitly set as C<Getopt> attributes. All other attributes
+are ignored by the command line handler.
=cut