Huh. Between 5.12 and 5.16 somewhere, the behavior of ClassName->isa('UNIVERSAL') changed.
It used to be that that would return true if and only if that namespace existed.
Now it always returns true for any random non-existant made up name.
Changed this to do ->can() on a known existing method modules with this API have (serialize)
instead after floundering around for a bit. exists ${"main::"}{$type.'::'} worked a little
bit but made it barf for some reason I didn't investigate.
This is the problem apparently behind the previous "haunted house level shit" fixes and
reversions. This thing does automatically load these modules on the fly. Would be nice
if the unit tests had some comments in them.
This commit is contained in:
@@ -155,8 +155,7 @@ sub _factory {
|
||||
my $type = $CLASSES_OF{ $class }->{ $name }
|
||||
or croak "No class given for $name";
|
||||
|
||||
# require all types here
|
||||
$type->isa('UNIVERSAL')
|
||||
$type->can('serialize')
|
||||
or eval "require $type"
|
||||
or croak $@;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user