Keep It Simple, Stupid | |
PerlMonks |
Re^13: How to completely destroy class attributes with Test::Most?by jcb (Parson) |
on Aug 28, 2019 at 23:25 UTC ( [id://11105193]=note: print w/replies, xml ) | Need Help?? |
The key motivation for independent iterator objects is that they allow the program to have multiple iterators even on the same category by removing the need for the File::Collector object to track the iterators. These "bundles" look a lot like independent iterators, and you could easily introduce an ->all method that returns a special object like so: (in File::Collector::Iterator)
This allows subclasses of File::Collector::Iterator to define their own "bundle actions" invokable as $iterator->all->$action. For example, a subclass that adds a delete action could contain simply:
In Section
Seekers of Perl Wisdom
|
|