develooper Front page | perl.perl5.porters | Postings from February 2006

Re: This Fortnight on perl5-porters (6-19 February 2006)

Thread Previous | Thread Next
Glenn Linderman
February 24, 2006 17:00
Re: This Fortnight on perl5-porters (6-19 February 2006)
Message ID:
On approximately 2/24/2006 3:13 PM, came the following characters from 
the keyboard of Jan Dubois:

> On Fri, 24 Feb 2006, David Nicol wrote:
>>>Windows allows hard links (although the method to achieve
>>>them is somewhat cumbersome)
>>that is a stunning revelation. Anyone for adding this cumbersome
>>method to pp_link?
> I already did this back in 1999. It only works on NTFS and it requires
> the process to have at least "Backup and Restore" privileges, but it has
> been in Perl since 5.6.0.

Oh!  Some of my comments on the other thread then, were misconceived.  I
had no idea that you actually implemented the link ability; I had no 
idea it was available via Perl; I thought that you were only supporting 
the ability to correctly report on links created via Posix subsystem.

Does it work for files only, or also directories?  And on Unix hard
links on directory are somewhat frowned upon, what about on NTFS?

Of course, it is clear that a Perl program that needs to support 
non-NTFS file systems should avoid using features such as link that only 
work on NTFS, but the ability to create links via small Perl utilities 
that cannot easily be done any other way on the Windows platform, is 
good to know about.

And what about the documentation in the ActivePerl User Guide that says 
(in part)

> Certain functions don't seem to work on ActivePerl.
> There are several functions that are unimplemented in the ActivePerl system. Here is a complete list of unimplemented functions:
> Functions for filehandles, files, or directories
>     link(), symlink(), chroot()

But okay the reference is given to perlport where it says

>     Not implemented. (Mac OS, MPE/iX, VMS, RISC OS) 
>     Link count not updated because hard links are not quite that hard (They are sort of half-way between hard and soft links). (AmigaOS)
>     Hard links are implemented on Win32 (Windows NT and Windows 2000) under NTFS only.

So my misunderstanding (and David's, likely) was due to not reading 
every possible scrap of documentation.  But it is very misleading to say 
  in one place that it is "unimplemented", and then somewhere else say 
that it is partially implemented...  And while I'm reading and referring 
to the _Windows_ ActivePerl User Guide here, would ActivePerl for 
Solaris, for AIX, for HP-UX, for Linux, for Mac OS X all have the same 
restrictions?  The _Windows_ ActivePerl User Guide is not actually 
particularly well-labeled as being the _Windows_ version... I got it 
with the Windows installation, so I know it is, and it liberally refers 
to various Windows versions, etc.  But given that there are multiple 
platforms for ActivePerl, if the documentation is not common to all of 
them, it should be identified as platform specific.

But don't hold up ActivePerl to fix these niggling problems; 
they are not new problems; but they should be fixed eventually.  There 
are likely lots of people that think they found the answer to "are hard 
links supported in Perl on Windows" after reading the "unimplemented" 
comment in the ActivePerl User Guide....  On the other hand, if they can 
be fixed without holding up the release, that would be goodness.

Glenn --
The taxpayer: That's someone who works for the federal government--
but doesn't have to take the civil service examination.  -- Ronald Reagan

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About