I'll definately consider ::Exhaustive. Thanks!
does ->next() return a list? if yes, why?
There are different opinions and tastes regarding this. I prefer to design iterators so that the next method returns undef in scalar context and the empty list in list context when it's exhausted. A successful match may be "" or "0", and that would force me to write
to not leave the loop prematurely.while (defined(my $match = $matcher->next)) { ... }
lodin
In reply to Re^2: RFC: Regexp::AllMatches
by lodin
in thread RFC: Regexp::AllMatches
by lodin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |