Thanks for all your help.
I liked
use if $^O eq "MSWin32", "Win32::API";
the best, but settled on using:
BEGIN{
if($^O =~ /MSWin32/i){ require Win32::API; }
}
This is because our Linux base is still operating on Perl 5.6.0, so the really
cool conditional 'use' is not recognized.
Barry
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Brian
Raven
Sent: Wednesday, October 12, 2005 7:43 AM
To: $Bill Luebkert
Cc: [email protected]
Subject: RE: "require" Win32::API
$Bill Luebkert <mailto:[EMAIL PROTECTED]> wrote:
> Brian Raven wrote:
>>
>> See the "use if" pragma. The following works fine on Win32, Liniux
>> and Solaris.
> ...
>> use if $^O eq "MSWin32", "Win32::API";
>
> Now there's an obscure one. Where are the docs/syntax description
> for that pragma ? This is the extent of my docs:
>
> if "use" a Perl module if a condition holds
Strange. 'perldoc if' seems to do the trick for me. Also, it is listed
under pragmas in the Activestate html documentation.
I am using perl 5.8.*, if that helps. I think that it is a fairly recent
addition. I don't think it was in 5.6.
HTH
--
Brian Raven
=================================
Atos Euronext Market Solutions Disclaimer
=================================
The information contained in this e-mail is confidential and solely for the
intended addressee(s). Unauthorised reproduction, disclosure, modification,
and/or distribution of this email may be unlawful.
If you have received this email in error, please notify the sender immediately
and delete it from your system. The views expressed in this message do not
necessarily reflect those of Atos Euronext Market Solutions.
L'information contenue dans cet e-mail est confidentielle et uniquement
destinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee.
Toute copie, publication ou diffusion de cet email est interdite. Si cet e-mail
vous parvient par erreur, nous vous prions de bien vouloir prevenir
l'expediteur immediatement et d'effacer le e-mail et annexes jointes de votre
systeme. Le contenu de ce message electronique ne represente pas necessairement
la position ou le point de vue d'Atos Euronext Market Solutions.
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs