##
my $doer = new ThingThatDoesStuff ({@parameters});
while ($doer->GetNextEvent()) {
# handle event
}
####
package ThingWithCallbacks;
use ThingAsIterator;
sub DoThing {
my ($params) = @_;
my $callback = $params->{callback};
my $doer = new ThingAsIterator ({@parameters});
while (my $event = $doer->GetNextEvent()) {
&$callback($event);
}
}
####
------------
:Wq
Not an editor command: Wq