Subject: | errors from bad-input.t |
It looks like these depend on the Perl version. I'm seeing errors on
perl5.8.7, but correct functioning on perl5.8.6. (However, the latter is
on macosx, so I can't rule out something OS-dependent). However, what
seems to be happening is:
(from bad-input.t)
ok 12 - test received exactly one warning for bad input '0'
not ok 13 - ... and did not throw an exception.
This is causing can.pm's _is_invocant(0) to go ferretting in the symbol
table, which is returning true. As you say, "all kinds of bad input that
might get crazy results". Calling UNIVERSAL::isa(0, ...) is nuts.
Ferreting in the symbol table for 0 is nuts. :)
If I were you I'd patch can.pm like this:
@@ -78,6 +78,7 @@
sub _is_invocant
{
my $potential = shift;
+ return if !$potential;
Cheers
Tim