
davorg
Thaumaturge
/ Moderator
Jun 8, 2004, 1:04 AM
Post #2 of 2
(516 views)
|
|
Re: [rgdutta] Regarding perl intepretation.
[In reply to]
|
Can't Post
|
|
I think we probably need to see the code in X.pm that loads the other modules. If you're using code like this:
if ($hp) { use Some::HP::Module; } if ($win) { use Some::Win::Module; } Then that doesn't do what you think it does. It will always try to load both of the modules. This is because "use" is executed at compile time and the $hp and $win variables aren't given values until run time. You probably want to look at using "require" and "import" instead. -- Dave Cross, Perl Hacker, Trainer and Writer http://www.dave.org.uk/ Get more help at Perl Monks
|