Subject: | Improperly assumes all refs are Exception::Base objects |
Your throw code does a check like this:
if (not ref $self) {
And if it's a ref, it automatically assumes that it's a Exception::Base
object. It should do something like this:
unless (blessed $self && $self->isa('Exception::Base'))
This occurred in a chain of events with this module:
https://metacpan.org/source/TEDDY/Mail-Builder-Simple-0.16/lib/Mail/Builder/Simple/TT.pm
The $t->error in the throw statement might not be a standard string. It
might be a full-blown Exception, like a Template::Exception. Here's the
final error message:
Can't locate object method "ATTRS" via package "Template::Exception" at
..../Exception/Base.pm line 1065."
Also, Exception::Died does parse it correct, but you might want to stay
away from "ref string reading" for classes. Using blessed and isa is
the best way to go. (Remember, isa checks subclasses.)