On 20 Mar 2003 at 16:45, Steve Grazzini wrote:

> [EMAIL PROTECTED] wrote:
> > 
> > My problem is that I would like to have only
> > one script (to simplify maintanence and deployment)
> > for all OSs. So, for example, for Win32 machines
> > I may need Win32::API and Win32::DriveInfo; if I
> > use this contstruct:
> > 
> >   ...
> >   if ($^O eq 'MSWin32') {
> >     use Win32::API;
> >     use Win32::DriveInfo;
> >     ...
> >   } ...
> > 
> > the script doesn't compile under non-Win32 systems.
> 
> You can use require/import in a BEGIN block, and in
> 5.8.0 there is also -->
> 
>   use if $^O eq "MSWin32" => Win32::API;
>   use if $^O eq "MSWin32" => Win32::DriveInfo;
> 

Yep, I'm using require/import, but that 5.8 solution
is really slick - thanks!

Aloha => Beau;



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to