in reply to Re^2: using strict from another module
in thread using strict from another module

It's because you are no longer using Exporter's import. ToolSet takes care of this by doing the import for you, plus it will re-export functions from other modules -- which you'd also have to do in your custom import routine if you want to make, say, Carp functions available when Mod::Personal is used.

You're really just re-implementing ToolSet step-by-step. Here's how ToolSet would work:

package Mod::Personal; use base 'ToolSet'; ToolSet->set_strict(1); ToolSet->export( 'Carp' => undef, # get the defaults for Carp 'List::Util' => 'shuffle sum', # or specific functions ); our @Export = qw( phash ); sub phash { # your code here } 1;

-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^4: using strict from another module
by Anonymous Monk on Mar 31, 2006 at 15:39 UTC
    Hi,

    I will probably end up using toolset in the long run, I'm just trying to get a handle on packages and modules, importing/exporting etc. For me the best way to learn is try to do it and learn from a (very) long list of mistakes ;-). Once I know it (enough to satisfy myself anyway) I revert to using "magic" modules.

    Many thanks for all the help.
    Displeaser