List Info

Thread: Re: :Compress::Base destructor




Re: :Compress::Base destructor
user name
2007-09-11 10:13:51
Paul Marquess wrote:
> P5P -- the proposed change is to localise the global
error variables like
> this in the DESTROY method
> sub DESTROY
> {
>     my $self = shift ;
>     local($., $, $!, $^E, $?); # <= Add This
>     $self->close() ;
> }
>
>
> I'm in two minds about this change. Any opinions?

Rafael Garcia-Suarez wrote:
> I was thinking the same thing. My conclusion was, more
or less, "if
> you want to check the value of $! anyway, you can
always call close()
> directly, so that patch seems safe". But Graham,
who maintains
> IO:ir, has
not answered yet. (And that is not 5.10-critical)

Taking a pass through blead, this change might be applicable
to the following:

ext/Digest/SHA/SHA.pm
lib/IO/Dir.pm
lib/IO/Compress/Base.pm
lib/IO/Uncompress/Base.pm
lib/CGI.pm
lib/CPAN/Tarzip.pm
lib/CPAN.pm
lib/DirHandle.pm
lib/ExtUtils/CBuilder/Base.pm
lib/ExtUtils/Install.pm
lib/ExtUtils/ParseXS.pm
lib/File/Temp.pm
lib/Net/NNTP.pm
lib/Net/Ping.pm
lib/Net/POP3.pm

There may be others, too.

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )