in reply to How do I know if I'm in a BEGIN block?
See perlmod.
BEGIN { $I_AM_COMPILING = 1 } INIT { $I_AM_COMPILING = 0 } sub foo { if ( ! $I_AM_COMPILING ) { } }
I don't know if that will work, but that's what I'd try first.
In Section
Seekers of Perl Wisdom