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

2010-08-02 Thread Joachim Breitner
Hi Jeremiah,

Am Montag, den 02.08.2010, 09:13 -0700 schrieb Jeremiah Mahler:
> I agree.  The dependency that "dangling_symlinks" has on "follow => 1"
> is not reflected in the man page.
> [..]

> 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.

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

-- 
Joachim "nomeata" Breitner
Debian Developer
  nome...@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata


signature.asc
Description: This is a digitally signed message part


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

2010-08-02 Thread Jeremiah Mahler
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


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

2010-08-01 Thread Joachim Breitner
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