ext_137904 ([identity profile] sps.livejournal.com) wrote in [personal profile] swestrup 2003-06-28 08:05 am (UTC)

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.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting