Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37559517
en ru br
Репозитории ALT
S:3.004-alt2
5.1: 2.00.10-alt1
www.altlinux.org/Changes

Группа :: Разработка/Perl
Пакет: perl-SOAP-WSDL

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: SOAP-WSDL-2.00.10-debian-load_with_class_load.patch
Скачать


Description: fix class loading with Perl 5.18
 In Perl 5.18 everything is an object, so $type->isa('UNIVERSAL') succeeds even
 when $type is a plain string representng a class that was never loaded.
 .
 Deferring the check and the actual class loading to Class::Load fixes the
 issue.
Author: Damyan Ivanov <dmn@debian.org>
Bug: https://rt.cpan.org/Ticket/Display.html?id=74257
Bug-Debian: http://bugs.debian.org/720964
--- a/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm
+++ b/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm
@@ -7,6 +7,7 @@ use SOAP::WSDL::XSD::Typelib::Builtin;
 use Scalar::Util qw(blessed);
 use Data::Dumper;
 require Class::Std::Fast::Storable;
+use Class::Load ();
 
 use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anyType);
 
@@ -155,9 +156,8 @@ sub _factory {
         my $type = $CLASSES_OF{ $class }->{ $name }
             or croak "No class given for $name";
 
-        # require all types here
-        $type->isa('UNIVERSAL')
-            or eval "require $type"
+        Class::Load::is_class_loaded($type)
+            or eval { Class::Load::load_class $type }
                 or croak $@;
 
         # check now, so we don't need to do it later.
--- a/META.yml
+++ b/META.yml
@@ -8,6 +8,7 @@ license: artistic
 resources:
   license: http://opensource.org/licenses/artistic-license.php
 requires:
+  Class::Load: 0
   Class::Std::Fast: 0.0.5
   Data::Dumper: 0
   Date::Format: 0
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin