snafu has asked for the wisdom of the Perl Monks concerning the following question:
What he is doing is modularizing. This is good except that every module he's creating he's calling it 'package main;' essentially (I believe) placing every module as a piece of the calling main body. Ok, in theory this is what sounds like is happening, however, I am running into a snag.
Whenever I try to edit my piece of the pie and then execute it, my subs get compiled and *run*!!! thus failing because, well, nothing is being passed to them yet, or in other words, a bunch of undefs are being seen hence unitialized variables in the symbol table when I try to do something in the sub with a variable. Technically, though, I'd think that nothing should be being done with these subs yet anyway. At least not until the main body calls my code. *shrug*. Im not sure. I've read the docs but I must either be missing something or the package main; being placed at the top of every module is throwing me off.
Any foresight would be greatly appreciated!
TIA
_
_
_
_
_
_
_
_
_
_
- Jim
Insert clever comment here...
2002-04-21 Edit by Corion - moved from Meditation to SoPW
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: A lil module creation advice
by rinceWind (Monsignor) on Apr 20, 2002 at 10:17 UTC | |
by snafu (Chaplain) on Apr 21, 2002 at 03:26 UTC | |
by rinceWind (Monsignor) on Apr 21, 2002 at 09:38 UTC | |
|
Re: A lil module creation advice
by Ryszard (Priest) on Apr 20, 2002 at 07:25 UTC | |
|
Re: A lil module creation advice
by impossiblerobot (Deacon) on Apr 20, 2002 at 13:55 UTC | |
|
Re: A lil module creation advice
by greywolf (Priest) on Apr 20, 2002 at 15:58 UTC | |
by snafu (Chaplain) on Apr 21, 2002 at 02:56 UTC | |
by snafu (Chaplain) on Apr 22, 2002 at 17:05 UTC |