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

Find::File and AFP mounts

Matthew Simon Cavalletto
January 16, 2002 08:52
Find::File and AFP mounts
Message ID:

I recently noticed that I was unable to "perl; 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.)



[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
.... Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About