allow constraint/exclude options together
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI.pm
index 600e269..baf1372 100644 (file)
@@ -203,8 +203,8 @@ sub _filter_tables {
     my $constraint   = $opts->{constraint};
     my $exclude      = $opts->{exclude};
 
-    @tables = grep { /$constraint/ } @$tables if defined $constraint;
-    @tables = grep { ! /$exclude/  } @$tables if defined $exclude;
+    @tables = grep { /$constraint/ } @tables if defined $constraint;
+    @tables = grep { ! /$exclude/  } @tables if defined $exclude;
 
     TABLE: for my $table (@tables) {
         try {