Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi
I normally load my modules depending if the script runs on Windows or on Mac with the following:
use if $VersionOS eq 'Win', LWP::UserAgent::ProxyAny;
Now I have the quite stupid problem that I need to declare the variables that need to be exported, for example:
use if $VersionOS eq 'Win', Win32::OLE::Const qw( Microsoft.Word);
...which does not work. Any ideas?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Load module conditionally and export variables
by haukex (Archbishop) on Jan 29, 2019 at 15:16 UTC | |
by Anonymous Monk on Jan 29, 2019 at 15:20 UTC |