smullis has asked for the wisdom of the Perl Monks concerning the following question:
Does anyone have any suggestions as to how I can use different modules / packages based on the OS of the machine running the script?
The following does not seem to work:
I have a vague feeling that eval or AUTOLOAD may have something to do with it... but if I knew then I wouldn't be asking!if ($^O =~ /Win/ ) { use Win32::Package } else { use Unix::Package }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to use different packages depending on host OS?
by Corion (Patriarch) on Oct 27, 2004 at 11:28 UTC | |
by smullis (Pilgrim) on Oct 27, 2004 at 11:36 UTC | |
|
Re: how to use different packages depending on host OS?
by borisz (Canon) on Oct 27, 2004 at 11:31 UTC | |
by radiantmatrix (Parson) on Oct 27, 2004 at 15:30 UTC | |
|
Re: how to use different packages depending on host OS?
by Anonymous Monk on Oct 27, 2004 at 14:14 UTC |