On Mon Feb 04 16:28:07 2013, RIBASUSHI wrote:
Show quoted text> On Fri, Feb 01, 2013 at 07:14:16PM -0500, Graham Knop via RT wrote:
>
> I now wonder if this doesn't extend further. E.g. what about this state
> in a CLONE block when a fresh thread has just spawned? Or what about the
> transition between run and compile time (any do/eval)? I *think* there
> is even more stuff we are missing...
>
> Perhas asking p5p is a logical next step? After all we do not have a
> moving target anymore - anything after 5.14 is irrelevant.
I've played around a bit with it and made sure that the only time
B::main_start()->isa('B::NULL') will be true is during the initial
compile phase and global destruction, not any other state. And CHECK
happens after the initial compile, making it a safe time to start
checking main_start.
Threading is a somewhat different matter. My changes pass the tests
(with threading), but they focus mainly on end/destruction time, which
is why my initial try missed the CHECK portion. I'll work on extending
those tests as needed. Running perl embedded is another thing I haven't
tested.
So yes, probably worth checking with p5p in case there's something missing.
As an aside, I released the module Devel::GlobalPhase that emulates the
rest of ${^GLOBAL_PHASE}.