From: Brian Phillips Date: Wed, 28 Sep 2011 16:21:25 +0000 (-0500) Subject: allow constraint/exclude options together X-Git-Tag: 0.07011~39 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2db2c8982208e6d6e74bd673158277cdabd5c2a1;p=dbsrgits%2FDBIx-Class-Schema-Loader.git allow constraint/exclude options together --- diff --git a/Changes b/Changes index 7e79d47..16a2de9 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ Revision history for Perl extension DBIx::Class::Schema::Loader + - allow the constraint and exclude options to be used simultaneously + (bphillips) - fix Oracle common tests fail with multi_schema due to not resetting the preserve_case option after the preserve_case tests (RT#70829) - handle DEFAULT NULL for Pg diff --git a/lib/DBIx/Class/Schema/Loader/DBI.pm b/lib/DBIx/Class/Schema/Loader/DBI.pm index 600e269..baf1372 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI.pm @@ -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 {