I agree. The dependency that "dangling_symlinks" has on "follow => 1" is
not reflected in the man page.
"dangling_symlinks"
If true and a code reference, will be called with the symbolic
link
name and the directory it lives in as arguments. Otherwise, if
true
and warnings are on, warning "symbolic_link_name is a dangling
symbolic
link\n" will be issued. If false, the dangling symbolic link will
be
silently ignored.
Code such as this would not work:
find({
wanted => sub { print $File::Find::name . "\n"; },
dangling_symlinks => sub { print "dangling: " . $File::Find::name .
"\n"; },
}, qw(dir_to_search));
but this would:
find({
wanted => sub { print $File::Find::name . "\n"; },
dangling_symlinks => sub { print "dangling: " . $File::Find::name .
"\n"; },
follow => 1,
}, qw(dir_to_search));
Perhaps the documentation could be changed to something like:
"dangling_symlinks"
If true and a code reference and "follow => 1", will be called
with the symbolic link
name and the directory it lives in as arguments. Otherwise, if
true
and warnings are on, warning "symbolic_link_name is a dangling
symbolic
link\n" will be issued. If false, the dangling symbolic link will
be
silently ignored.
On Sun, Aug 1, 2010 at 6:18 AM, Joachim Breitner wrote:
> Package: perl-modules
> Version: 5.10.1-13
> Severity: normal
> File: /usr/share/perl/5.10.1/File/Find.pm
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi,
>
> when using the find method of File::Find, it seems that the
> dangling_symlink callback is only called if follow => 1. This is not
> reflected in the manpage, and there are valid use cases for follow =>0
> and dangling_symlinks.
>
> Greetings,
> Joachim
>
> - -- System Information:
> Debian Release: squeeze/sid
> APT prefers unstable
> APT policy: (500, 'unstable'), (101, 'experimental')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 2.6.34-1-amd64 (SMP w/2 CPU cores)
> Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
>
> Versions of packages perl-modules depends on:
> ii perl 5.10.1-13 Larry Wall's Practical
> Extraction
>
> perl-modules recommends no packages.
>
> perl-modules suggests no packages.
>
> - -- no debconf information
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAkxVdAgACgkQ9ijrk0dDIGwYzACfRp8fS/1MTeH7ABJzPMYJc8Zr
> o5YAn0heXyl0ZpyIwTcnFrA9bd3XACdN
> =sPxt
> -END PGP SIGNATURE-
>
>
>
> --
> To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmas...@lists.debian.org
>
>
--
Jeremiah Mahler
jmmah...@gmail.com