I have perl modules which are platform specific.But there is a file which contains functions of which some are used by some of the platform specific modules.Eg let HP.pm is the HPUX module and win.pm the windows specific module.Let the common module be X.pm

In HP.pm and win.pm i have the following line of code.

use X qw(:Hp); ---> this is in HP.pm this module uses some func abc() in X.pm

use X qw(:win); ----> this is in win.pm this module uses some function def() in X.pm.This has windows specific stuff.

when i try to tun my program on a HPUX box why does the intepreter try to load some windows modules in X.pm eventhough this is run on the HPUX box and throws error.....

I think we probably need to see the code in X.pm that loads the other modules.

If you're using code like this:

Code

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.