From: Piotr Roszatycki Date: Tue, 11 Nov 2008 14:56:58 +0000 (+0000) Subject: * Look only one class at default. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Getopt.git;a=commitdiff_plain;h=c7ecf9ea05c3f551abaf9588dc3fdcab13c4aec4 * Look only one class at default. --- diff --git a/lib/MooseX/Getopt.pm b/lib/MooseX/Getopt.pm index a915d5a..1e7c91a 100644 --- a/lib/MooseX/Getopt.pm +++ b/lib/MooseX/Getopt.pm @@ -48,7 +48,9 @@ sub new_with_options { my $getopt = defined $params{getopt} ? $params{getopt} - : $class->_default_getopt_session->new; + : $class->_default_getopt_session->new( + classes_filter => sub { $_ eq $class } + ); my %options = $getopt->options;