in reply to Re: Constants and Subclasses...
in thread Constants and Subclasses...
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.
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Constants and Subclasses...
by ferreira (Chaplain) on Dec 19, 2006 at 11:45 UTC | |
by diotalevi (Canon) on Dec 19, 2006 at 17:47 UTC |