develooper Front page | perl.perl5.porters | Postings from August 2008

Re: Iterator::Diamond (Was: Re: Fighting the Good Fight against spam deluge)

Thread Previous | Thread Next
From:
Johan Vromans
Date:
August 2, 2008 12:52
Subject:
Re: Iterator::Diamond (Was: Re: Fighting the Good Fight against spam deluge)
Message ID:
m2r697urdi.fsf_-_@phoenix.squirrel.nl
chromatic <chromatic@wgz.org> writes:

> 	my $input = Iterator::Files->new(@filelist);
> 	while (<$input>) { ... }

Yes, except that the constructor takes other arguments as well. I've
currently implemented:

  my $input = Iterator::Files->new( files => \@filelist );

> Creating a new API in 2008 which requires the localization of a
> magic global to do something obvious seems wrong to me.

The question remains to what level it must be compatible with the
current <> implementation. When a file list is passed, I'd say that
@ARGV should remain untouched. But should ARGV, $ARGV and ARGVOUT
still reflect the status of the iterator, as they do with <> ?

-- Johan

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About