develooper Front page | perl.macosx | Postings from January 2002

Find::File and AFP mounts

From:
Matthew Simon Cavalletto
Date:
January 16, 2002 08:52
Subject:
Find::File and AFP mounts
Message ID:
064E57E3-09F5-11D6-B6EE-003065412C16@cavalletto.org
FYI...

I recently noticed that I was unable to "perl Makefile.pl; make" modules 
from source directories that I had mounted from a Mac OS X Server to my 
Mac OS X desktop machine using Apple's standard AFP file sharing, and 
after struggling for a bit found the problem.

Comparing an "ls -l" of a local directory with a remote one mounted via 
the Finder's "Connect to Server..." command, I noticed that the remote 
directory always reported 1 for the number of links in subdirectories. 
(See below.)

It turns out that File::Find uses that information to speed up directory 
recursion, so when building in a remote directory, folders like lib/ and 
the like were never explored, and the build would fail.

I fixed this by manually patching my local copy of File::Find to 
hard-code $File::Find::dont_use_nlink = 1.

Longer-term, it looks like Chris Nandor has a patch to the MacPerl 
version of File::Find that correctly detects when it's safe to use the 
nlink value; if that makes it in to the standard distribution the 
problem should go away. (I think.)
   http://archive.develooper.com/perl5-changes-mac@perl.org/msg00079.html

-Simon

---

[stellar:~] admin% ls -l /Library/
total 0
drwxrwxr-x   11 root   admin   330 Dec 19 12:44 Application Support
drwxrwxr-x    5 root   admin   264 Sep 14 23:43 Audio
drwxr-xr-x    4 root   admin   264 Oct 12 23:49 Caches
drwxrwxr-x    4 root   admin   264 Sep 11 06:29 ColorSync
drwxrwxr-x   21 root   admin   670 Oct 12 23:34 Desktop Pictures
drwxrwxr-x    9 root   admin   264 Oct 23 04:35 Documentation
....

[stellar:~] admin% ls -l /Volumes/MacOSX/Library/
total 0
drwxrwxrwx  1 admin  unknown   264 Feb 25  2001 Application Support
drwxr-xr-x  1 admin  unknown   264 Sep 18 20:25 Audio
drwxrwxrwx  1 admin  unknown   264 Nov  8 00:11 Caches
drwxr-xr-x  1 admin  unknown   264 Sep 18 20:24 ColorSync
drwxr-xr-x  1 admin  unknown   704 Nov  8 00:38 Desktop Pictures
drwxr-xr-x  1 admin  unknown   264 Oct 23 04:35 Documentation
....




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