Do you know where your variables are? | |
PerlMonks |
Re: Automatically importing a subroutine for a particular namespaceby Joost (Canon) |
on Jul 04, 2008 at 18:56 UTC ( [id://695623]=note: print w/replies, xml ) | Need Help?? |
AFAIK fatalsToBrowser is not an exported subroutine, but a hook that installs a process-wide DIE handler. IOW you generally only want to call fatalsToBrowser once, at some place that easy to find so you can remove it when deploying your code in production.
In the general case of importing modules/variables in lots of modules, I prefer to import everything I want into some package and automatically export them from there:
Note that this package does not have to be a base class of anything. You only have to use it wherever it's needed:
In Section
Seekers of Perl Wisdom
|
|