perlquestion
sdetweil
I have this app that is cross platform, supports window, linux, solaris, aix,hpux, linux-z, .. 32 and 64 bit.
as I port around, I keep running into some windows only modules not available on other platforms.. duh..
<p>
so, I'd like to convert my 'use Win32' to 'require Win32'.
and load the library.. seems simple.. but I guess I must be missing the last little thing..
<p>
current code
<code>
$my osname = Win32::GetOSName();
</code>
(note the lack of an explicit 'use')<br>
using examples on the web I changed it to
<code>
my modname='Win32';
require $mymodname;
import $mymodname qw(GetOSName);
$my osname = GetOSName();
</code>
<br>
which fails
<br>
Undefined subroutine &main::GetOSName
<br>
all the examples seem to be fine, but they don't show the code that consumes the functions of the package when used in a dynamic load implementation.
thanks
Sam