develooper Front page | perl.perl5.porters | Postings from October 2010

Re: [RFC] Exposing PL_dirty to perl space

Thread Previous | Thread Next
Florian Ragwitz
October 3, 2010 22:42
Re: [RFC] Exposing PL_dirty to perl space
Message ID:
Eric Brine <> writes:

> On Sat, Oct 2, 2010 at 1:58 PM, Florian Ragwitz <> wrote:
>> This very much makes sense to me, and I've implemented a ${^PHASE}
>> global allowing to differentiate between these phases:
>>  - initial interpreter construction
>>  - initial compile-time
>>  - running CHECK blocks
>>  - running INIT blocks
>>  - run-time
>>  - running END blocks
>>  - global destruction
> BEGIN { $SIG{__WARN__} = sub { ... }; } 123; print 456;
> If the above occurred in a module, your scheme would report run-time
> in the callback were the module required then. I would like the
> handler to know it was called by the compiler.

Oh, hold on a second. I think I misunderstood your snippet at
first. Sorry about that.

However, most of my previous answer still applies. ${^PHASE} provides
"what's the current global phase of the whole interpreter?", not "did
the interpreter have to compile some more code after already having
entered run-time?" or anything like that.

Phases are executed in the order of the list quoted above. Once in one
stage, there's no going back.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About