We don't bite newbies here... much | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
There's nothing wrong with your approach. You just need to
make a couple changes.
First, put everything that has to do with exporting first. In this case, that is everything except the use Module::Monkey, and use Module::Ape. Secondly, if you are going to load at compile time anything that needs to recursively use your module (as Module::Monkey and Module::Ape do), make sure you've set up everything for exporting at compile time. In this case, change "require Exporter" to "use Exporter ()", and put the setting of @ISA and @EXPORT in a BEGIN block. With those changes, you should be just fine. Separating out your constants to a different module is a nice idea, and it's fairly easy to get Module to pass them along to things that import Module also, but it isn't necessary (and does take slightly more memory, if you are dealing with mod_perl or the like.) In reply to Re: Problems importing constants in multiple namespaces
by ysth
|
|