On Wed, 31 Jul 2002 11:47:40 -0700, Noah Hoffman wrote: >My perl scripts are required to run on both Win machines and OS X. I'm >using Win32::IProcess.pm on the Win machines to do some interacting >with other apps. I don't use or need it on the Mac although on Classic >OS I had it installed just so the perl would compilte. Now on OSX the >main file won't compile because IProcess.pm isn't returning true.
It isn't? Why not? Have you fixed the line ends? Typically, a module doesn't return true if Perl thinks it's all one line. Just one comment (till the end of the line) is all it takes... >Is there a way for me to conditionally use the perl mod depending on >platform? I tried the following: > >if($^O =~ /Win32/) > use Win32::IProcess.pm; >} > >but it doesn't seem to work. You can simply require() the thing, and forget about import(). Just use fully qualified names for the subs and variables that would have been imported. A fully OO module doesn't export one single thing, so then there's no problem... You don't mention how you actually call the subs... You can't be using the same calls on a Mac and on Windows, are you? I can't find a trace of the module, the old URL <http://www.generation.net/~aminer/Perl/> contains nothing, so I can't check for myself. -- Bart.