NAME
List::Enumerate - Provides list enumeration
VERSION
version 0.003
SYNOPSIS
Provides a simple means of list enumeration.
my @list = qw(Larry Moe Curly);
for my $enum ( enumerate(@list) ) {
print $enum->index, " ", $enum->item, "\n";
}
Instead of
my @list = qw(Larry Moe Curly);
my $count = 0;
for my $entry ( @list ) {
print $count, " ", $entry, "\n";
$count++;
}
METHODS
enumerate
Returns a list of List::Enumerate objects when called with a list
index
List::Enumerate call, returns the index position
item
List::Enumerate call, returns the item
new
Constructor for List::Enumerate, used internally
run
Used for internal testing when package is run as a script
AUTHOR
James Spurin <spurin@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by James Spurin.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.