Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: How to share a group of functions with multiple main processes?

by Eily (Vicar)
on Nov 19, 2013 at 17:45 UTC ( #1063365=note: print w/replies, xml ) Need Help??

in reply to How to share a group of functions with multiple main processes?

How do you run your two perl scripts? If it was indeed impossible for multiple scripts to use (well, require in your case) the same module at the same time, that issue would have been raised long ago.

I recommend you read Perl Modules. To make it short, if (something that is not a standalone Perl script but should be included, ie a module should have the .pm extension) is in the same folder as your script, to include it you just have to write: use PrintVar. And if it is in Something, use Something::Printvar;. This would allow you to move all your files at once without having to change every include path. You should still read Perl Modules if you want to make "good" Perl modules, to learn about packages (namespaces) and exporting.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1063365]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2017-04-27 09:40 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (501 votes). Check out past polls.