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

[perl #121523] [PATCH] Document -l on symlinkless file systems

From:
Tony Cook via RT
Date:
April 14, 2014 05:32
Subject:
[perl #121523] [PATCH] Document -l on symlinkless file systems
Message ID:
rt-4.0.18-873-1397453566-869.121523-15-0@perl.org
On Fri Mar 28 09:37:49 2014, smylers@stripey.com wrote:
> Documenting Zefram's reply to Dave M's question about -l:
> http://www.nntp.perl.org/group/perl.perl5.porters/2014/03/msg214012.html

There's a gap in the implementation too, while it would be almost pointless to implement symlink() on Win32[1], perhaps -l should work:

  J:\>perl -le "print 'link ', -l shift() ? 'yes' : 'no'" test
  link no
  
  J:\>dir
   Volume in drive J is SSD
   Volume Serial Number is 742B-DD2C
  
   Directory of J:\
  
  11/02/2014  03:11 PM    <DIR>          dev
  14/04/2014  03:02 PM               461 end
  25/03/2014  08:06 AM    <DIR>          games
  05/02/2014  11:06 AM    <DIR>          steam
  14/04/2014  03:02 PM    <SYMLINK>      test [end]
  10/04/2014  11:28 AM    <DIR>          VMs
                 2 File(s)            461 bytes
                 4 Dir(s)  176,709,697,536 bytes free

That said, implementing it would require a re-write of win32_stat(), since _stat()/_stati64() doesn't appear to return the appropriate flags.

Tony

[1] it requires admin access

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=121523



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