in reply to import() and symbol-table population!? (compile vs. runtime)

One possibility could be to use a CHECK or INIT block, which run after the initial compile time but before the execution of the program starts. See the "BEGIN, CHECK, INIT, and END" section of perlmod for more on exactly when these blocks are run.

-- David Irving
  • Comment on Re: import() and symbol-table population!? (compile vs. runtime)

Replies are listed 'Best First'.
Re^2: import() and symbol-table population!? (compile vs. runtime)
by phaylon (Curate) on Feb 07, 2007 at 14:17 UTC

    A few days (might be weeks, I'm not that good with large quantities of time) ago I uploaded Filter-EOF to CPAN to ease the execution of code post-compile time. In it's 0.02 version it also allows to inject code at the end of the file.

    I would try the INIT approach you mentioned first, though, to see if it's convenient enough.


    Ordinary morality is for ordinary people. -- Aleister Crowley