From: Peter Rabbitson Date: Mon, 18 Feb 2013 07:37:54 +0000 (+0100) Subject: Regex /o is *EVIL* - no idea why I even thought of using that X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=569b96bba24cd24097c3496d6c6da02498933190;p=dbsrgits%2FDBIx-Class-Historic.git Regex /o is *EVIL* - no idea why I even thought of using that --- diff --git a/Changes b/Changes index 4550819..1314d63 100644 --- a/Changes +++ b/Changes @@ -7,6 +7,7 @@ Revision history for DBIx::Class * Fixes - Fix another embarrassing regression preventing correct refining of the search criteria on a prefetched relation (broken in 0.08205) + - Fix incorrect callsite reporting by DBIC::Carp 0.08208 2013-02-20 09:56 (UTC) * New Features / Changes diff --git a/lib/DBIx/Class/Carp.pm b/lib/DBIx/Class/Carp.pm index 443e6ca..6fac196 100644 --- a/lib/DBIx/Class/Carp.pm +++ b/lib/DBIx/Class/Carp.pm @@ -30,7 +30,7 @@ sub __find_caller { my $fr_num = 1; # skip us and the calling carp* my @f; while (@f = caller($fr_num++)) { - last unless $f[0] =~ $skip_pattern; + last if $f[0] !~ $skip_pattern; if ( $f[0]->can('_skip_namespace_frames') @@ -69,8 +69,8 @@ sub import { my $into = caller; $skip_pattern = $skip_pattern - ? qr/ ^ $into $ | $skip_pattern /xo - : qr/ ^ $into $ /xo + ? qr/ ^ $into $ | $skip_pattern /x + : qr/ ^ $into $ /x ; no strict 'refs'; diff --git a/t/99dbic_sqlt_parser.t b/t/99dbic_sqlt_parser.t index 82d9364..33c33c2 100644 --- a/t/99dbic_sqlt_parser.t +++ b/t/99dbic_sqlt_parser.t @@ -34,7 +34,7 @@ BEGIN { push @schemas, create_schema({ args => { parser_args => { $parser_args_key => $s } } }); - } qr/\Qparser_args => {\E.+?is deprecated/, + } qr/\Qparser_args => {\E.+?is deprecated.+\Q@{[__FILE__]}/, "deprecated crazy parser_arg '$parser_args_key' warned"; } @@ -65,7 +65,7 @@ SKIP: { parser => 'SQL::Translator::Parser::YAML' )->translate( data => SQL::Translator->new( - parser_args => { package => $s }, + parser_args => { dbic_schema => $s }, parser => 'SQL::Translator::Parser::DBIx::Class', producer => 'SQL::Translator::Producer::YAML', )->translate