develooper Front page | perl.perl5.porters | Postings from April 2003

RE: windows, shortcuts and 'use lib'

Thread Previous | Thread Next
From:
Orton, Yves
Date:
April 28, 2003 07:17
Subject:
RE: windows, shortcuts and 'use lib'
Message ID:
71B318898201D311845C0008C75DAD1C0896099D@defra1ex2
Arthur wrote....
> On måndag, apr 28, 2003, at 14:11 Europe/Stockholm, Horsley Tom wrote:
> 
> > My point was that if you want to read a .lnk file, there is a lot
> > more information in one than just a path, therefore readlink() is
> > inadequate to extract all the other information, but if .lnk files
> > get transparentely disappeared by the perl runtime, readlink()
> > is left as the only way to read .lnk files.
> 
> The better approach here would then be to not change the perl core to 
> support .lnk files and rather have a module overload readlink() to 
> follow .lnk files

I would have thought that putting it in the core would be the better plan.
Why should
unix be the only platform whose links are handled properly by perl? (Outside
of the fact
that most of the core-programmers are *nix people? ;-) Surely this is also a
portability/
interoperability issue? Just as perl goes out of its way to make flock() or
fork() behave 
the same cross platform shouldnt the same go for .lnk files? At least
insofar as readlink goes?

Although I guess if you want portable code then having a File::Symlink
module that
does the right thing on all OS'es ala File::Spec (maybe even put it in
File::Spec)
wouldnt be too bad.

Personally think that that Perl should do the right thing on as many OS'es
as possible
in as many cases as possible, without requiring the end users to be aware of
where they need 
to use special module to make their code portable.

Yves

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About