develooper Front page | perl.perl5.porters | Postings from November 2011

Re: Curious closure behaviour - somewhat solved...

Thread Previous
From:
demerphq
Date:
November 28, 2011 07:05
Subject:
Re: Curious closure behaviour - somewhat solved...
Message ID:
CANgJU+V9RO2sBVzLXw_o=m_E4WU6HGW+wzEzqCuKTGqEr1ws9Q@mail.gmail.com
On 28 November 2011 15:57, demerphq <demerphq@gmail.com> wrote:
> I guess this is well known, but there are a number of legacy and
> existing closure bugs, some of which Dave M appears to have solved,
> and some of which probably I guess are "won't fixes" judging by the
> warnings. I just thought I would call peoples attention to it. There
> is a ticket in the RT queue right now related to this ("Variable "$x"
> is not available").

Oh. The thing I would *really* like to understand is why it fails
inconsistently when executed as a script or as a module.

Is the success when executed as a script a happy accident? Does it
hide deeper insanity? If it is not an accident nor insane that it
works correctly when executed as a script then why is it not possible
to "fix" this when the code is in a module?

I would love some insight as to why it should matter if code is
compiled in a module or not, as I am struggling to understand how that
makes any sense at all.

cheers,
Yves

Thread Previous


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