From: Dagfinn Ilmari Mannsåker Date: Fri, 18 Jul 2014 09:08:01 +0000 (+0100) Subject: Correct comments about overload methods vs. ->can() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e8d729d48d43e5ef9645d608ce8de423fd349597;hp=44e54b410631b988e08e25617363a1efeadecd0d;p=scpubgit%2FQ-Branch.git Correct comments about overload methods vs. ->can() --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index d8251ce..37d83cc 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -99,8 +99,10 @@ 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) + # simply using ->can('(""') can leave behind stub methods that + # break actually using the overload later (see L and the source of overload::mycan()) # # either has stringification which DBI SHOULD prefer out of the box grep { *{ (qq[${_}::(""]) }{CODE} } @{ mro::get_linear_isa( ref $_[0] ) } @@ -108,8 +110,6 @@ sub is_plain_value ($) { # has nummification and fallback is *not* disabled # reuse @_ for even moar speedz ( - # 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 (