Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: cross platform scripts

by bart (Canon)
on Jan 23, 2003 at 03:59 UTC ( [id://229216]=note: print w/replies, xml ) Need Help??


in reply to cross platform scripts

You can use "require", provided the module has an OO interface exclusively — or more correct: provided you use only the OO interface, if you have the choice. The former appears to be the case for this particular module, Win32::TieRegistry. Yes, require() should very likely work.

Update: Oh, dear. I just noticed that this module uses ("abuses"?) the import method for other purposes. Even if you don't provide any arguments to it, you still might have to call import() explicitely:

require Win32::TieRegistry; Win32::TieRegistry->import;
The fact that it is called at runtime, not at compile time, doesn't matter because of the module's OO interface.

Warning: The code has not been tested to see if it has the desired effect. Since I don't want to mess with my registry just to see if it works, it'll just have to be this way. Sorry.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://229216]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (1)
As of 2024-04-19 18:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found