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

File::Find modified to pass arguments to the wanted function

Thread Next
From:
Roger Yager
Date:
May 20, 2004 02:25
Subject:
File::Find modified to pass arguments to the wanted function
Message ID:
auto-000000152005@eyestreet.com
Dear Perl developers,

 

            Over the years I have found myself using the File::Find module
quite extensively.  However, there has been several times where I wanted to
pass arguments to the callback routine instead of using global variables.  

 

Therefore, I have taken the initiative and updated the File::Find module to
allow the passing of an optional hash reference to the callback routine.
This was done by creating the new option "wanted_argref" which will hold a
reference to the hash table that should be passed as an argument to the
callback routine.  The module behaves the same with or without the
modification yet allows for more flexibility in handling the data received
by find.  

 

Attached is the file Find.diff which contains a diff -c of the minor changes
that were necessary to incorporate this new feature.  Please do with it as
you deem appropriate.

 

 

Respectfully,

Roger Yager

Software Engineer

encryptit@aol.com

 

 


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