BEGIN is only necessary because you're doing this all in a single file and need to hack the order of execution. This wouldn't normally be an issue in real code. Also, if you switched to use Parent; @ISA = 'Parent' instead of base.pm then you wouldn't need to separately call import. Further... making the parent export it's constants means that all other code that merely uses Parent will also get the constants exported and that's likely *not* what you want.
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
In reply to Re^2: Constants and Subclasses...
by diotalevi
in thread Constants and Subclasses...
by t'mo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |