From: Peter Rabbitson Date: Thu, 17 Jul 2014 17:05:49 +0000 (+0200) Subject: Aha - this is why I didn't use ->can originally X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=44e54b410631b988e08e25617363a1efeadecd0d;hp=0da0fe34ca9d452d6775777f691b100a28d98907;p=scpubgit%2FQ-Branch.git Aha - this is why I didn't use ->can originally Punt for the time being, will investigate why later. The error looks like: rabbit@Ahasver:~/devel/dbic$ git rev-parse HEAD 32497625ce5699576c8a63edd16401d4f741c282 rabbit@Ahasver:~/devel/dbic$ PERL5LIB=/home/rabbit/devel/sqla/lib prove -lT t/100populate.t t/100populate.t .. 1/? Stub found while resolving method "???" overloading """" in package "Path::Class::File" at /home/rabbit/devel/sqla/lib/SQL/Abstract.pm line 118, <> line 1. t/100populate.t .. Dubious, test returned 255 (wstat 65280, 0xff00) All 43 subtests passed Test Summary Report ------------------- t/100populate.t (Wstat: 65280 Tests: 43 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output Files=1, Tests=43, 1 wallclock secs ( 0.04 usr 0.00 sys + 0.90 cusr 0.03 csys = 0.97 CPU) Result: FAIL --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index ce4ead9..d8251ce 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -99,13 +99,18 @@ sub is_plain_value ($) { ( # FIXME - DBI needs fixing to stringify regardless of DBD # + # FIXME - simply using ->can('(""') trips up Path::Class in + # inexplicable ways under -T (likely other modules too) + # # either has stringification which DBI SHOULD prefer out of the box - $_[0]->can( '(""' ) + grep { *{ (qq[${_}::(""]) }{CODE} } @{ mro::get_linear_isa( ref $_[0] ) } or # has nummification and fallback is *not* disabled # reuse @_ for even moar speedz ( - $_[0]->can('(0+') + # FIXME - simply using ->can('(0+') trips up Path::Class in + # inexplicable ways under -T (likely other modules too) + grep { *{"${_}::(0+"}{CODE} } @{ mro::get_linear_isa( ref $_[0] ) } and ( # no fallback specified at all