I will concede that this is not for the feint-of-heart - newbies find it difficult to fathom the concept, so, writers shouls probably provide an alternative interface for common goodies like File::Find.
The larger issue, as I see it, is that coderefs provide an elegant solution such as this one. Plenty of modules use filters as properties - either as regexen or coderefs.
To simplify caller understanding, I usually provide an alternative of pre-specifying the code-ref as an object property, then calling a method that will invoke the coderef.
Beyond personal preferences, and perceived complexity, is there a reason NOT to use coderefs ?
"Man cannot live by bread alone...
He'd better have some goat cheese and wine to go with it!"
In reply to Re^3: Iterator as a Class or Object Method
by NetWallah
in thread Iterator as a Class or Object Method
by arc_of_descent
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |