K
kj
I want to write a class whose instances are iterators that will
behave similarly to (readonly) file handles. I.e. I want to be
able to write:
my $thingie = Thingie->new( @args );
while ( <$thingie> ) {
# do stuff with $_
}
Can someone point me to a good example of a module in CPAN that
does this, for me to study? I'm looking specifically for a module
that achieves this functionality via standard Perl subclassing (as
opposed to tied variables, which I find too magic and mysterious).
TIA!
kj
behave similarly to (readonly) file handles. I.e. I want to be
able to write:
my $thingie = Thingie->new( @args );
while ( <$thingie> ) {
# do stuff with $_
}
Can someone point me to a good example of a module in CPAN that
does this, for me to study? I'm looking specifically for a module
that achieves this functionality via standard Perl subclassing (as
opposed to tied variables, which I find too magic and mysterious).
TIA!
kj