Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: How can I include a module for Windows only??

by Benedictus (Beadle)
on Dec 17, 2003 at 15:55 UTC ( [id://315290]=note: print w/replies, xml ) Need Help??


in reply to How can I include a module for Windows only??

You can use the if module to "use" another module if a condition is true. In your case, you might have:

use if ($^O =~ /Win/i), "Win32::Setupsup"; use if ($^O !~ /Win/i), "Expect";

Warning: the above code is untested.

The "if" module should come with Perl, but you can get it from CPAN if need be.

Benedictus

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-19 03:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found