xref: /openbsd-src/gnu/usr.bin/perl/cpan/Test-Harness/t/lib/MyIterator.pm (revision 6fb12b7054efc6b436584db6cef9c2f85c0d7e27)
1b39c5158Smillert# subclass for testing customizing & subclassing
2b39c5158Smillert
3b39c5158Smillertpackage MyIterator;
4b39c5158Smillert
5b39c5158Smillertuse strict;
6*6fb12b70Safresh1use warnings;
7b39c5158Smillert
8*6fb12b70Safresh1use base qw( TAP::Parser::Iterator MyCustom );
9b39c5158Smillert
10b39c5158Smillertsub _initialize {
11b39c5158Smillert    my $self = shift;
12b39c5158Smillert    $self->SUPER::_initialize(@_);
13b39c5158Smillert    $main::INIT{ ref($self) }++;
14b39c5158Smillert    $self->{initialized} = 1;
15b39c5158Smillert    $self->{content} = [ 'whats TAP all about then?', '1..1', 'ok 1' ];
16b39c5158Smillert    return $self;
17b39c5158Smillert}
18b39c5158Smillert
19b39c5158Smillertsub next {
20b39c5158Smillert    return shift @{ $_[0]->{content} };
21b39c5158Smillert}
22b39c5158Smillert
23b39c5158Smillert1;
24