|
|
| We don't bite newbies here... much | |
| PerlMonks |
Re: Re: A lil module creation adviceby snafu (Chaplain) |
| on Apr 20, 2002 at 23:26 UTC ( [id://160848]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
<indent>Are the modules in question .pm files being used (pulled in at compile time) or .pl files being required (at run time)?</indent>
Yes. These files are called script_name.pm with their first line containing package main; and every module that is being written is being called from the main script as use script_name. Now, I realize that this i s just basicly placing the namespace of each script into main:: which is fine but I am still not clear why my subs are being run at compile time. Here is a portion of my code:
Now. I have just spoken to the main coder about my issue and he made it clear that what I was doing was setting a scalar by calling a function which of course I was but that this was causing the problem. He also said that I needed to simply make a bunch of functions and not worry about creating any global scalars or arrays. Everything makes sense to me now but Im still curious what the other monks think.
_
_
_
_
_
_
_
_
_
_
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||