develooper Front page | perl.perl5.porters | Postings from May 2004

Re: FW: File::Find modified to pass arguments to the wanted function (with attachment)

Thread Previous | Thread Next
From:
Mark Jason Dominus
Date:
May 20, 2004 05:19
Subject:
Re: FW: File::Find modified to pass arguments to the wanted function (with attachment)
Message ID:
20040520122053.31114.qmail@plover.com
hv@crypt.org:
> Gisle Aas <gisle@ActiveState.com> wrote:
> :Another option is simply to pass a closure that capture the arguments
> :you want your callback to receive.  
> :But again, I think File::Find is fine as it is.
> 
> I agree, 


It's not always convenient to do that.  The variable must be available
to both the callback and to the caller of File::Find::find, which
means that they must be defined in the same scope.  This isn't always
practical.

I have wondered for a long time why File::Find didn't have this
feature.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About