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

Owner: Nobody in particular
Requestors: kas [...]

Bug Information
Severity: (no value)
Broken in:
  • 1.08
  • 1.09
  • 1.10
  • 1.11
Fixed in: (no value)

Subject: Subroutine _call redefined at (eval ...) during second SOAP::Lite->new()
Download (untitled) / with headers
text/plain 962b
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/ 2014-11-21 17:56:25.564703445 +0100 +++ SOAP/ 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: $@"; } }
text/x-perl 363b
#!/usr/bin/perl -w use strict; use lib '.'; use SOAP::Lite; my $first = SOAP::Lite->new( service => '', ); my $second = SOAP::Lite->new( service => '', );

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to