Forum Moderators: coopster & phranque

Message Too Old, No Replies

When can you use a module inside of a required script?

         

csdude55

6:27 am on Jan 25, 2024 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



For the most part, I move any function or set of variables that is used in more than one Perl script to its own script and then use require to import it. And often, that shared script uses a module that isn't used in the rest of the script.

But I've found that sometimes I can import the module into the shared script... but sometimes I can't.

Is there a method to the madness, or do I just have to always stick the modules in and see if they work?

phranque

10:17 pm on Jan 25, 2024 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



what are the symptoms for the times that you cannot?