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.
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
In reply to Re^2: Auto-evaluating anonymous subroutines
by diotalevi
in thread Auto-evaluating anonymous subroutines
by dabreegster
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |