in reply to Re: Auto-evaluating anonymous subroutines
in thread Auto-evaluating anonymous subroutines

There's no need to put your @EXPORT and *import assignment in a BEGIN block. File-level code in modules is run just after it's been compiled. It's where the required "true" value comes from. That is, if Character uses AutoExecute, the work required to set up Exporter has already completed by the time AutoExecute->import() is run. You only need to use a BEGIN block if other code in the same module cares that your snippet runs before later code in the same file is compiled.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

  • Comment on Re^2: Auto-evaluating anonymous subroutines

Replies are listed 'Best First'.
Re^3: Auto-evaluating anonymous subroutines
by ikegami (Patriarch) on Feb 21, 2006 at 03:25 UTC

      I'm ttrying to think of the last time I wrote modules that used each other. A few years? They were OO and didn't use Exporter either.

      ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊