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