The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Bot::Backbone::Dispatcher::PredicateIterator - Iterator over the predicates in a dispatcher

VERSION

version 0.161950

SYNOPSIS

  my $iterator = $dispatcher->predicate_iterator;
  while (my $predicate = $iterator->next_predicate) {
      # do something...
  }

DESCRIPTION

This is a helper for iterating over predicates in a Bot::Backbone::Dispatcher.

ATTRIBUTES

dispatcher

This is the dispatcher this iterator iterates over.

METHODS

BUILD

Resets the iterator to the start at construction.

next_predicate

Returns the next Bot::Backbone::Dispatcher::Predicate or undef if all predicates have been iterated through.

reset

Starts over by retriving the list of predicates that belong to the associated Bot::Backbone::Dispatcher.

AUTHOR

Andrew Sterling Hanenkamp <hanenkamp@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Qubling Software LLC.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.