-
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 => [] };
-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
+ grep {
+ $_->does("MooseX::Getopt::Meta::Attribute::Trait")
+ } $class->$next(@args);
+};
-=over 4
+no Moose::Role;
-=item meta
+1;
-Is a section devoted to making the #!#%^ stupid pod coverage test pass. Stevan, I do
-hope you're actually reading this.
+=head1 DESCRIPTION
-Love,
-Yuval
+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.
-=back
+Also, no L<Getopt::Long> global option is activated. Especially, 'pass_through' is
+not set.
=cut