Subject: | documentation bug |
Date: | Wed, 09 Jan 2008 18:54:42 -0500 |
To: | bug-File-Find-Iterator [...] rt.cpan.org |
From: | John SJ Anderson <genehack [...] genehack.org> |
The Synopsis for File::Find::Iterator shows this:
use File::Find::Iterator;
my $find = File::Find::Iterator->new(dir => ["/home", "/var"],
filter => \&isdir);
In my hands, that doesn't work; I have to do this:
use File::Find::Iterator;
my $find = File::Find::Iterator->create(dir => ["/home", "/var"],
filter => \&isdir);
(that is, s/new/create/ for the method name.)
This is actually consistent with the documentation in the Description
section, which lists create() and doesn't list new() -- but it's
fairly confusing to have code from the Synopsis fail to work.
FWIW, the error I get when calling the new() method is:
Unknow method dir at /home/genehack/test.pl line 8
Thanks for the module; it's exactly what I was looking for.
chrs,
john.
--
"That's the problem with nature, something's always stinging you or
oozing mucous all over you. Let's go and watch TV."
--- Calvin