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.
|