* Look only one class at default.
Piotr Roszatycki [Tue, 11 Nov 2008 14:56:58 +0000 (14:56 +0000)]
lib/MooseX/Getopt.pm

index a915d5a..1e7c91a 100644 (file)
@@ -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;