Bug#470090: libsoap-lite-perl: "Subroutine redefined" warnings

Damyan Ivanov dmn at debian.org
Thu Apr 3 19:00:23 UTC 2008


-=| gregor herrmann, Thu, Apr 03, 2008 at 05:19:03PM +0200 |=-
> @@ -34,9 +32,10 @@
>  # hack for HTTP connection that returns Keep-Alive
>  # miscommunication (?) between LWP::Protocol and LWP::Protocol::http
>  # dies after timeout, but seems like we could make it work
> +my $_patched = 0;
>  sub patch {
> +    return if $_patched;
>      BEGIN { local ($^W) = 0; }
> -    no warnings "redefine";
>      {
>          sub LWP::UserAgent::redirect_ok; *LWP::UserAgent::redirect_ok = sub {1}
>      }
> #v-
> 
> Turning off the warnings again should be rather simple by re-adding
> the deleted line; I just don't feel very comfortable about
> suppressing warnings in general ...
> 
> Other comments?

How about moving the `no warnings "redefine";' *inside* the curly
brackets? That would limit its scope, while still avoiding the warning.

-- 
dam            JabberID: dam at jabber.minus273.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20080403/0595b673/attachment.pgp 


More information about the pkg-perl-maintainers mailing list