Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Splitting program into modules

by harangzsolt33 (Chaplain)
on Nov 12, 2018 at 03:06 UTC ( [id://1225602]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Splitting program into modules
in thread Splitting program into modules

Oh, yes, there seems to be no difference between include() and require. I haven't thought of that! :/

Replies are listed 'Best First'.
Re^4: Splitting program into modules
by LanX (Saint) on Nov 12, 2018 at 03:19 UTC
    > no difference between include() and require

    Actually you reimplemented do

    require is basically a do that searches through @INC and accepts module::names.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

      Actually you reimplemented do

      ..., poorly: do has no 1 MB limit, do keeps track of the current filename for error messages, lexicals from the enclosing scope are not visible to code executed by do, and in case of relative paths other than './' and '../', do searches @INC and updates %INC.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 21:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found