Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: loading modules using 'use'

by ikegami (Patriarch)
on Jul 12, 2010 at 22:20 UTC ( [id://849121]=note: print w/replies, xml ) Need Help??


in reply to Re^2: loading modules using 'use'
in thread loading modules using 'use'

If that's the entire file, there's essentially no difference between those two snippets.

The BEGIN will affect the order in which those statements will be executed in relation to other statements in the file.

Replies are listed 'Best First'.
Re^4: loading modules using 'use'
by angshuman (Novice) on Jul 13, 2010 at 03:15 UTC
    That was just a sample module... Lets assume its got plenty of subroutines written in it, which are also included in the @EXPORT list. Then ???
      With BEGIN, @EXPORT will be initialised before the subs are compiled. Without, after.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2024-04-24 22:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found