Subject: | Unexpected behavior for reset_cursor method |
Not sure whether this is a bug or a misunderstanding on my part. If the
latter, perhaps an additional sentence in the documentation for
reset_cursor() would be helpful.
use strict;
use warnings;
use Set::CrossProduct;
my @data = ([ qw(a b) ], [ qw(X Y Z) ]);
my $iter = Set::CrossProduct->new(\@data);
print "@$_\n" while $_ = $iter->get;
# I had expected that this would allow me to run through
# the iterations again, but it does not.
$iter->reset_cursor;
print "@$_\n" while $_ = $iter->get;