List::Cycle - Objects for cycling through a list of values
Version 0.02
use List::Cycle; my $color = List::Cycle->new( {vals => ['#000000', '#FAFAFA', '#BADDAD']} ); print $color->next; # #000000 print $color->next; # #FAFAFA print $color->next; # #BADDAD print $color->next; # #000000
Creates a new cycle object, using @values.
Sets the internal pointer back to the beginning of the cycle.
Returns a handy string representation of internals.
Gives the next value in the sequence.
Andy Lester, <andy@petdance.com>
<andy@petdance.com>
Please report any bugs or feature requests to bug-list-cycle @ rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=List-Cycle. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-list-cycle @ rt.cpan.org
List::Cycle is a playground that uses some of the ideas in Damian Conway's marvelous Perl Best Practices, due out in mid-2005 from O'Reilly. One of the chapters mentions a mythical List::Cycle module, so I made it real.
Copyright 2005 Andy Lester, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install List::Cycle, copy and paste the appropriate command in to your terminal.
cpanm
cpanm List::Cycle
CPAN shell
perl -MCPAN -e shell install List::Cycle
For more information on module installation, please visit the detailed CPAN module installation guide.