Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Re: Export/import variables

by bart (Canon)
on Mar 19, 2003 at 21:08 UTC ( [id://244457]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Export/import variables
in thread Export/import variables

Then how could I possibly use the value of $path? Must I put everything into the import subroutine?
No, not everything... You can use it in any other method that you call at run time. But top level code runs at compile time — i.e. in the require step. Before the import step, just like pfaut said.

Just print the "Hello" in the import routine.

From the above code, how could I export the users hash?
In import, call SUPER::import. Or Exporter::import. Just make sure the arguments to the call are right.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://244457]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-03-28 08:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found