I don't think the eval {} and eval "" constructs are even related. eval {} only does trap handling, but otherwise is just a block construct; in particular it still compiles at compile time. eval "", on the other hand, fires up a new compiler at runtime, when all static procesing is long over, so the only environmental linkage that's posible by this point is dynamic. That's sort of what it's for.
So I don't think there's a mystery there.
You might try BEGIN { eval "" }, if that's the semantics you're after.
There's also a note in the docs that BEGIN { fork } is broken on machines without 'real' processes, if that's what you're doing (because the Perl interpreter fakes forking by thread duplication, but apparently the parser doesn't run in a real thread, or something like that).
Finally, not that "Support for concurrent interpreters and the fork() emulation was implemented by ActiveState, with funding from Microsoft Corporation." Of which you may make what you will.
no subject
So I don't think there's a mystery there.
You might try BEGIN { eval "" }, if that's the semantics you're after.
There's also a note in the docs that BEGIN { fork } is broken on machines without 'real' processes, if that's what you're doing (because the Perl interpreter fakes forking by thread duplication, but apparently the parser doesn't run in a real thread, or something like that).
Finally, not that "Support for concurrent interpreters and the fork() emulation was implemented by ActiveState, with funding from Microsoft Corporation." Of which you may make what you will.