develooper Front page | perl.perl5.porters | Postings from July 2009

Re: Coring Variable::Magic / autodie fights with string eval in Perl 5.10.x

Thread Previous | Thread Next
From:
Offer Kaye
Date:
July 5, 2009 02:22
Subject:
Re: Coring Variable::Magic / autodie fights with string eval in Perl 5.10.x
Message ID:
5694250907050222k5e704c5cv8d648736a2c973d@mail.gmail.com
On Sun, Jul 5, 2009 at 11:57 AM, Paul Fenwick wrote:
>
> But I consider it a bug that the contents of %^H are being
> stringified as soon as the string eval has been compiled.
>

I could be wrong about this but it looks to me that the last part of
your sentence ("has been compiled") is wrong. From what I understand
string eval is parsed every time the eval is executed - namely, at run
time, not compile time. At least it looked to me that way since the
block form of eval doesn't seem to trigger the problem:

##############################
{
    use autodie;
    eval {1};
}

open(my $fh, '<', 'no_such_file');
##############################

Doesn't give any message.

Regards,
--
Offer Kaye

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About