in reply to Intercepting compile time blocks like BEGIN {}

Might the safe module help in this case? Maybe you could allow init to run, as long as just does init in memory... If it keeps its handles to itself and doesn't touch the disk/network, is that ok?

  • Comment on Re: Intercepting compile time blocks like BEGIN {}

Replies are listed 'Best First'.
Re^2: Intercepting compile time blocks like BEGIN {}
by LanX (Saint) on Aug 09, 2010 at 14:26 UTC
    Well that's one of my questions. :)

    As I said "I took a look into Safe" but couldn't figure out how to achieve this goal.

    Safe seams mainly to intercept dedicated opcodes, are there special opcodes for CTBs?

    AFAIK opcodes are executed after compilation (to opcodes) so it should be already to late.

    Cheers Rolf