Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: dynamic loading modules

by chromatic (Archbishop)
on Sep 03, 2012 at 18:07 UTC ( #991496=note: print w/replies, xml ) Need Help??


in reply to Re^2: dynamic loading modules
in thread dynamic loading modules

This is never going to work:

my $win32 ="Win32.pm"; import $win32 qw(GetOSName);

If there isn't already an import() in your current package, this will effectively become:

'Win32.pm'->import( 'GetOSName' );

Because there's no package called Win32.pm, nothing will get imported. You're better off writing:

Win32->import( 'GetOSName' );

... or even:

'Win32'->import( 'GetOSName' );

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://991496]
help
Chatterbox?
NodeReaper settles into the armchair by the fire. You weren't using it were you?

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2017-05-24 17:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?