in reply to Re^4: Can't import constants in multiple namespaces
in thread Can't import constants in multiple namespaces
Just be careful not to create circular dependencies. MyMod uses MyMod::db and vice versa. That's likely to cause trouble. Instead, refactor all your constants to MyMod::constants and use that in MyMod and MyMod::db. In MyMod you can import from MyMod::constants and still re-export them in @MyMod::EXPORT.
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Can't import constants in multiple namespaces
by mje (Curate) on Mar 28, 2006 at 16:50 UTC |