in reply to What makes File::Find's interface so commonly hated
Another thing I have noticed is that people seem to have an aversion to File::Find's callback interface. There is a perceived loss of control. In some cases, there is a real loss of control, but usually it is mostly perception. Consider a case like the following, though (this is a made up interface, but it's just a demonstration):
while (my $found = $finder->next) { print $found->filename, "\n"; last if $found->pathname =~ $end_condition; next if $found->pathname =~ $skip_condition; process($found); }
This wouldn't be quite so nice with a callback interface, even though there's no reason it isn't possible.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: What makes File::Find's interface so commonly hated
by Aristotle (Chancellor) on Jul 16, 2006 at 19:02 UTC | |
|
Re^2: What makes File::Find's interface so commonly hated
by ikegami (Patriarch) on Jul 16, 2006 at 19:35 UTC | |
by revdiablo (Prior) on Jul 16, 2006 at 21:32 UTC |