I'll just touch base on a few points here instead of trying to insert my replies into 
a morass of angle brackets. :P

> yes, but what if you want to use commands that are native to the platform, not 
> perl analogs? And what if you want to do:

"Native" almost invariably means "non-portable".  This has nothing to do with perl 
whatsoever.

> use lib "$ENV{HOME}/$path_to_work_on_both_unix_and_nt";

The environmental variable "HOME" is a *NIX notion and shouldn't be expected to work 
on other platforms.  If your modules may reside in different locations based on the OS 
you could set up your custom lib paths in a BEGIN block:

##

BEGIN {

  my $lib_path;

  if ($^O eq 'MSWin32') { # may be slightly different under cygwin, et al

    $lib_path = 'c:/foo/bar';

  } elsif ($^O eq 'SomeUnixType') { # or something more realistic

    $lib_path = '/usr/lib/foo/bar';

  }

  unshift @INC, $lib_path;

}

##

> I'd like the ability for the preprocessor to take the script file name that is fed
> to it, and change it on the fly so that cygdrive/mingw paths are translated into
> 'native' windows paths before passed to the script. I'd also like hard links 
> for directories to be implemented and testable via -l, and for cygwin to be able to
> compile all Win32 modules.

> And maybe for 'use lib' to have the same translation done. (I think that anything 
> more 
> complicated the user should have to do)

Rather that try to hack out a preprocessor, just don't hardcode any paths if you know 
they are platform-dependent.

> yeah, a little. But its still too complicated, things should work IMO a lot more
> seamlessly than they do.

Perl is already making a lot of things less complex behind the scenes.  EVERY language 
has portability issues.  Even Java does depending on whose JVM implementation you are 
using.


Peter Guzis
Web Administrator, Sr.
ENCAD, Inc.
- A Kodak Company
email: [EMAIL PROTECTED]
www.encad.com 

-----Original Message-----
From: Edward Peschko [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 5:16 PM
To: Hanson, Rob
Cc: [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: perl on win32 annoyances



--snip--

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to