in reply to Aborting loading of file in a BEGIN block
I'd found this old post when I was finding solution for the same problem. Just now I've learned "man perlfilter" and it seems exactly what is needed - it allows to do not parse module at all depending on some custom conditions. Example from "man perlfilter" works well.