Front page | perl.perl5.porters |
Postings from June 2008
Re: IO::Dir destructor
Thread Previous
From:
Steve Peters
Date:
June 2, 2008 06:55
Subject:
Re: IO::Dir destructor
Message ID:
fd7a59d30806020655m6b10c885v357745d0b2fc3b79@mail.gmail.com
On Mon, Jun 2, 2008 at 7:48 AM, Dintelmann, Peter
<Peter.Dintelmann@dresdner-bank.com> wrote:
>
>> -----Ursprüngliche Nachricht-----
>> Von: Rafael Garcia-Suarez [mailto:rgarciasuarez@gmail.com]
>> Gesendet: Sonntag, 1. Juni 2008 21:49
>> An: Zefram
>> Cc: perl5-porters@perl.org
>> Betreff: Re: IO::Dir destructor
>>
>>
>> 2007/9/8 Zefram <zefram@fysh.org>:
>> > The IO::Dir destructor can clobber $! and other status variables.
>> > This is a bad thing to do implicitly upon exiting a block.
>> Attached patch
>> > fixes it.
>>
>> Thanks, applied as #33983.
>
>
> The same seems to happen in DirHandle.pm. Following the lines
> of Zefram:
>
> --- perl-current/lib/DirHandle.pm 2006-06-13 21:29:13.000000000 +0200
> +++ DirHandle.pm 2008-06-02 14:46:27.000000000 +0200
> @@ -60,6 +60,7 @@
> my ($dh) = @_;
> # Don't warn about already being closed as it may have been closed
> # correctly, or maybe never opened at all.
> + local($., $@, $!, $^E, $?);
> no warnings 'io';
> closedir($dh);
> }
>
Thanks! This was applied as change #33989.
Steve Peters
steve@fisharerojo.org
Thread Previous