in reply to Re: Re: Create a built-in-like sub?
in thread Create a built-in-like sub?
The code that wants to import also must do something -- namely, asking the other code to import stuff. If you require MODULE, you need to call MODULE->import(). If you use MODULE, Perl will call import() automatically.
Where did import() come from in MODULE? It came from using Exporter. If you'd require()d Exporter, you'd have had to call Exporter->import().
Does that help?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: Create a built-in-like sub?
by mirg drol (Initiate) on Feb 05, 2002 at 14:27 UTC |