Subject: | [PATCH] wrong return precedence |
returns binds stronger than and, so the expressions after and are ignored.
See https://rt.perl.org/rt3/Public/Bug/Display.html?id=59802
Subject: | DBIx-Class-Helpers-2.018001-returnand.patch |
diff -bu ./t/row/numifyget.t~ ./t/row/numifyget.t
--- ./t/row/numifyget.t~ 2013-07-02 20:40:24.000000000 -0500
+++ ./t/row/numifyget.t 2013-07-25 10:01:23.852572001 -0500
@@ -19,9 +19,9 @@
my $value = shift;
my $b_obj = B::svref_2object(\$value);
my $flags = $b_obj->FLAGS;
- return ( $flags & B::SVf_IOK or $flags & B::SVp_IOK
+ return (( $flags & B::SVf_IOK or $flags & B::SVp_IOK
or $flags & B::SVf_NOK or $flags & B::SVp_NOK
- ) and !($flags & B::SVf_POK )
+ ) and !($flags & B::SVf_POK ))
}
ok(is_numeric($schema->resultset('Foo')->first->bar_id),"bar_id has been 'numified' w/o is_numeric set");