in reply to Re^2: Iterator as a Class or Object Method
in thread Iterator as a Class or Object Method
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!"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Iterator as a Class or Object Method
by BUU (Prior) on Oct 03, 2005 at 21:26 UTC | |
by Anonymous Monk on Oct 03, 2005 at 21:45 UTC | |
by NetWallah (Canon) on Oct 04, 2005 at 00:05 UTC | |
by adrianh (Chancellor) on Oct 04, 2005 at 12:12 UTC |