in reply to Export again
You have to ->import the symbols in to your library:
use warnings; use strict; package MyStandardModules; use Time::HiRes (); package main; Time::HiRes->import('gettimeofday'); print gettimeofday();
I suggest either calling the function/method qualified with the namespace (ala my $time = Time::HiRes::gettimeofday()) or use()ing the module in the place you need the symbol imported.
Could you explain your adversion to use()ing the module in the package where the function is needed?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Export again
by Cagao (Monk) on Feb 22, 2011 at 09:19 UTC |
In Section
Seekers of Perl Wisdom