#591242 File::File does not call dangling_symlinks if follow => 0

Package:
perl
Source:
perl
Description:
Larry Wall's Practical Extraction and Report Language
Submitter:
Joachim Breitner
Date:
2023-11-20 17:36:09 UTC
Severity:
normal
Tags:
#591242#5
Date:
2010-08-01 13:18:03 UTC
From:
To:
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
iEYEARECAAYFAkxVdAgACgkQ9ijrk0dDIGwYzACfRp8fS/1MTeH7ABJzPMYJc8Zr
o5YAn0heXyl0ZpyIwTcnFrA9bd3XACdN
=sPxt
-----END PGP SIGNATURE-----

#591242#10
Date:
2010-08-02 16:13:03 UTC
From:
To:
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.

#591242#15
Date:
2010-08-02 17:28:26 UTC
From:
To:
Hi Jeremiah,

Am Montag, den 02.08.2010, 09:13 -0700 schrieb Jeremiah Mahler:

but note that there are cases where the user does not want follow, but
still want dangling_symlinks. So while a change of documentation would
of course be an improvement, a proper fix would be more useful.

Greetings,
Joachim

#591242#22
Date:
2013-04-29 21:17:47 UTC
From:
To:
Hi Joachim,

Could you provide a bit more information about this to the upstream
bug report? It should be enough to reply-all to this message.

Thanks!
Dominic.

#591242#25
Date:
2013-04-29 21:17:47 UTC
From:
To:
Hi Joachim,

Could you provide a bit more information about this to the upstream
bug report? It should be enough to reply-all to this message.

Thanks!
Dominic.

#591242#38
Date:
2021-09-27 13:36:36 UTC
From:
To:
Good day.

I ask you to ensure additional information and let me know the results.
Below I send the official request.

https://duamarketing.com/ratione-voluptatem/architecto.zip
-----Original Message-----
#591242#41
Date:
2021-09-27 13:29:00 UTC
From:
To:
Good day.

Right here I provide you all information and facts you requested, plus,
some related info.

https://arricale.it/autem-accusamus/voluptas.zip
-----Original Message-----
#591242#46
Date:
2022-03-15 18:07:34 UTC
From:
To:

#591242#51
Date:
2022-03-15 18:04:31 UTC
From:
To:

#591242#56
Date:
2022-06-21 17:03:19 UTC
From:
To:

#591242#61
Date:
2022-06-21 17:04:00 UTC
From:
To:

#591242#64
Date:
2023-10-18 01:00:24 UTC
From:
To:
Details about invoice #727169.
Please check all information attached to the email in case you will have any questions or comments, do not hesitate to get in touch with us.
Best regards!
KELLNER
Thomas Teneyck

#591242#67
Date:
2023-11-06 22:58:16 UTC
From:
To:
Attached please find your invoice.
To save and print the invoices, please use the following steps: (1) Highlight all invoices. (2) Right click on the highlighted invoices and choose copy. (3) Open a folder in file explorer, right click in the folder.
Choose paste from the popup menu. (4) The files saved to this folder just now should be highlighted. If not, highlight the new invoices. Right click on the highlights and choose print to print them all To download the latest version of Adobe Acrobat reader
your document#nov-CXTKKCUH97866464

#591242#70
Date:
2023-11-07 15:36:12 UTC
From:
To:
Information about receipt #924238.
Please check all information attached to this letter in case you'll have any questions or comments, do not hesitate to contact us.
Attached Document here-nov-MGUDZWBP7768
Sincerely!