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

Re: Fighting the Good Fight against spam deluge

From:
Roland Giersig
Date:
August 4, 2008 03:23
Subject:
Re: Fighting the Good Fight against spam deluge
Message ID:
4896D8AA.2010100@cpan.org
Johan Vromans wrote:
> Roland Giersig <rgiersig@cpan.org> writes:
> 
>> Could we please have a more general Iterator::Files that takes a list
>> of filenames with new()?
>>
>>    $input = Iterator::Files->new(@filelist);
> 
> I don't think that is a good idea. 
> 
> Since Iterator::Diamond is intended to behave like <>, it must operate
> on global @ARGV, $ARGV and ARGVOUT.

I was thinking along the lines:

  package Iterator::Diamond;
  @ISA = qw(Iterator::Files);
  # deal with ARGV, <> overloading, etc here

> Alternatively, I could limit the use of @ARGV, $ARGV and ARGVOUT to
> the case where no explicit file list is used.

Maybe, but that's too cluttered for me. Keep It Simple...

No, a generally-usable worker class with a specialized child class would 
be the right way, I think...

Cheers!
Roland



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