Skip Menu |

This queue is for tickets about the SOAP-Lite CPAN distribution.

Report information
The Basics
Id: 100496
Status: new
Priority: 0/
Queue: SOAP-Lite

People
Owner: Nobody in particular
Requestors: kas [...] fi.muni.cz
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 1.08
  • 1.09
  • 1.10
  • 1.11
  • 1.12
  • 1.13
  • 1.14
  • 1.15
  • 1.16
  • 1.17
  • 1.18
  • 1.19
  • 1.20
  • 1.22
  • 1.23
  • 1.24
  • 1.25
  • 1.26
  • 1.27
Fixed in: (no value)



Subject: Subroutine _call redefined at (eval ...) during second SOAP::Lite->new()
When I run SOAP::Lite->new() with the same service URL more than once, I get bunch of warnings: Subroutine xxx redefined at (eval xxx) line 145. A simple test script attached. Apparently SOAP::Lite tries to compile both WSDLs to the same package. This can be a problem - for example, if I want to have two SOAP::Lite objects with different settings (proxy, etc.) but the same service URL, or if I want to have a long-running process and the contents of the same URL can change between the SOAP::Lite->new() calls, etc. A quick but insufficient fix is to disable the "Subroutine redefined" warnings (patch attached). The proper fix would be to use a separate namespace prefix for each ->new() call. For example, in my test script, I may want to continue using $first with the old service description and $second with the new one, but I think current SOAP::Lite simply overwrites the shared package with the new version, should the contents of the URL change.
Subject: soap-lite-redefine.patch
--- SOAP/Lite.pm.orig 2014-11-21 17:56:25.564703445 +0100 +++ SOAP/Lite.pm 2014-11-21 17:56:01.742630557 +0100 @@ -3298,6 +3298,7 @@ eval "require $_" or Carp::croak "Could not load cached file: $@"; } else { + no warnings 'redefine'; eval $self->generate_stub($_) or Carp::croak "Bad stub: $@"; } }
Subject: soap_lite_test.pl
#!/usr/bin/perl -w use strict; use lib '.'; use SOAP::Lite; my $first = SOAP::Lite->new( service => 'https://github.com/xrosecky/JAVA_ISDS/raw/master/ISDSWebServices/src/main/resources/wsdl/dm_info.wsdl', ); my $second = SOAP::Lite->new( service => 'https://github.com/xrosecky/JAVA_ISDS/raw/master/ISDSWebServices/src/main/resources/wsdl/dm_info.wsdl', );