From: Patrick LeBoutillier [mailto:[EMAIL PROTECTED]]
>
> From: Brian Ingerson; [EMAIL PROTECTED]
> >
> > In Perl, $ref->{foo}->[42]->{bar} can always be written as
> > $ref->{foo}[42]{bar}. Only one '->' is needed.
> 
> I know about that. It's just an old habit that makes it a bit 
> clearer for me.

I do this too. Extra syntax but easier on my eyes.


> One question though: In Inline::Java I look at the PATH and
> CLASSPATH variables. The delimiter is ":" un Unix and ";" on
> Windows. 

Environment variables. I believe both : and ; are illegal for use in
filenames. I'm not sure what you need, but you should be able to split on
either.  @paths = split /(\:|\;)/, $ENV{'PATH'};


> I also create a makefile that calls "cp" (should be
> "copy" on Windows).
 
Instead of cp|copy, you could use Perl's File::copy, or you might go pick
out a Perl version of cp from the Perl Power Tools Project
(http://language.perl.com/ppt/).


> I also need took look for 'java.exe' instead of 'java' on
> the Windows platform.

Why do you need to look for java.exe?


> What's the best way to detect the running OS and do this kind of
> distinction? Is there any kind of standard method?

In my Makefile.PL's I put something that is pretty standard:

warn <<'EOT'  if $^O eq 'MSWin32';
Notes to Windows users:
o  You need to use the correct make command. That may be nmake
   or dmake depending on your C compiler. 
o  If you are using a Win32 ActiveState build then it is recommended
   that you use the ppm utility to fetch and install the latest
   version of this module.
EOT

Reply via email to