| Object-Iterate documentation | Contained in the Object-Iterate distribution. |
Object::Iterate::Tester - test module that uses Object::Iterate
use Object::Iterate qw( imap );
use Object::Iterate::Tester;
my $object = Object::Iterate::Tester->new();
my @list = imap { $_ } $object;
This module is on Github:
http://github.com/briandfoy/Object-Iterate
brian d foy, <bdfoy@cpan.org>
Copyright (c) 2002-2009 brian d foy. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Object-Iterate documentation | Contained in the Object-Iterate distribution. |
package Object::Iterate::Tester; use strict; use vars qw($VERSION); use warnings; no warnings; $VERSION = '1.12';
sub new { bless [qw(a b c d e f)], shift } sub __more__ { scalar @{ $_[0] } } sub __next__ { shift @{ $_[0] } } 1;