That still didn't work, but it was a lot clearer to figure out what to do.

So with a little help from the Camel book, I figured out how to wrap the
conditional 'use' in a way that works (well, compiles) on my (non-Win32)
system at least:

my $IsWin32;

BEGIN {
  $IsWin32 = ($^O =~ /MSWin32/i);

  if ($IsWin32) {
    require Win32::API; import Win32::API;
  } 
}

I'm sure there are Perl wizards out there who know how to do this sort of
thing much more elegantly.

Cheers,
adam

Next up: how to use this to steal the Lucida fonts from Java on Mac OS X...

Hans Hagen said this at Wed, 24 Sep 2003 17:17:08 +0200:

>At 14:45 24/09/2003 +0100, you wrote:
>
>>Looks like the current texfont is a bit broken right now. I believe it's
>>the introduction of the "if ($IsWin32) " block: the pragma "use
>>Win32::API" doesn't seem to work within the conditional block.
>
>can you try the attached version?
>
>Hans
>-------------------------------------------------------------------------
>                                   Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
>                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
>-------------------------------------------------------------------------
>                        information: http://www.pragma-ade.com/roadmap.pdf
>                     documentation: http://www.pragma-ade.com/showcase.pdf
>-------------------------------------------------------------------------

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Adam T. Lindsay                      [EMAIL PROTECTED]
 Computing Dept, Lancaster University   +44(0)1524/594.537
 Lancaster, LA1 4YR, UK             Fax:+44(0)1524/593.608
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Attachment: texfont-atl.zip
Description: Zip archive

Reply via email to