|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Re: Checking for duplicate subroutine namesby flexvault (Vicar) |
| on Oct 12, 2012 at 16:05 UTC ( #998733=note: print w/ replies, xml ) | Need Help?? |
|
Look at the use of 'package'. I believe that all variables and subroutines are defined by package. One way to do what you want is name your code as 'package something.pm'. Since your using require to bring the script into your main package, load your package via 'use' at the beginning of execution, and then loop on the require part which will include calls to your subroutines for building the user's script. I would also put the loop in an 'eval'. Other Perl Monks will have more experience with 'package' (hint: you need it for CPAN). I've only used it once or twice. Good Luck "Well done is better than well said." - Benjamin Franklin
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||