From 45982ff33027f823bb0be17f996ac1813cd71433 Mon Sep 17 00:00:00 2001 From: Scott Walters Date: Thu, 21 Aug 2014 08:37:49 -0400 Subject: [PATCH] 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. --- lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm b/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm index 90888bd..797cb88 100644 --- a/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm +++ b/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm @@ -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 $@;