HTTP::Cookies destructor

The destructor for HTTP::Cookies can clobber $! and the other global
status variables. Destructors need to avoid this because they are
called implicitly. This patch fixes it:

START_OF_PATCH
--- libwww-perl-5.808.orig/lib/HTTP/Cookies.pm 2004-11-12 10:06:12.000000000 +0000
+++ libwww-perl-5.808.mod0/lib/HTTP/Cookies.pm 2007-09-08 09:28:13.922627811 +0100
[at] [at] -507,6 +507,7 [at] [at]
sub DESTROY
{
my $self = shift;
+ local($., $ [at] , $!, $^E, $?);
$self->save if $self->{'autosave'};
}

END_OF_PATCH

-zefram
zefram [ Sa, 08 September 2007 10:31 ] [ ID #1815801 ]
Perl » perl.libwww » HTTP::Cookies destructor

Vorheriges Thema: self test fails for large values of $$
Nächstes Thema: Getting XML