Acme-OCEORA-Utils

 view release on metacpan or  search on metacpan

lib/Tie/Cycle.pm  view on Meta::CPAN


Tie::Cycle - Cycle through a list of values via a scalar.

=head1 SYNOPSIS

	use v5.10;
	use Tie::Cycle;

	tie my $cycle, 'Tie::Cycle', [ qw( FFFFFF 000000 FFFF00 ) ];

	say $cycle; # FFFFFF
	say $cycle; # 000000
	say $cycle; # FFFF00
	say $cycle; # FFFFFF  back to the beginning

	(tied $cycle)->reset;  # back to the beginning

=head1 DESCRIPTION

You use C<Tie::Cycle> to go through a list over and over again.
Once you get to the end of the list, you go back to the beginning.
You don't have to worry about any of this since the magic of
tie does that for you.



( run in 1.775 second using v1.01-cache-2.11-cpan-5511b514fd6 )