Closed mohawk2 closed 9 years ago
Calling a method on an unblessed reference is fatal. That's what
the blessed
call is checking.
If you want to eliminate blessed
, we need an alternative.
what about this?
ref($version) && eval { $version->can("new") }
The extra eval overhead is annoying, but I think does what we want.
Done. What do you think?
Further to Leon's (apparently now-deleted) comment, I've now changed it (after consulting the UNIVERSAL
doc) to:
eval { $version->isa("version") }
Fixed by #17
This is intended to solve a problem for EUMM: it depends on CMR, which depends on Scalar::Util, which depends on EUMM to install itself. This is a problem in Perl core. Switching to using
ref
instead ofScalar::Util::blessed
eliminates this problem, and doesn't seem to lose anything.