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

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

Thread Next
From:
Tom Christiansen
Date:
August 2, 2008 14:41
Subject:
Re: Iterator::Diamond (Was: Re: Fighting the Good Fight against spam deluge)
Message ID:
16029.1217713275@chthon
In-Reply-To: Message from Johan Vromans <jvromans@squirrel.nl> 
   of "02 Aug 2008 21:52:09 +0200." <m2r697urdi.fsf_-_@phoenix.squirrel.nl> 

> 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 <> ?

That was my own question exactly when first you posted the code.  But since
I didn't know what I thought the answer might/should be, I didn't ask it.

My hunch, and it is only a hunch not a conviction, is that near-tranparent
backwards compatibility is the only way to win over folks doing the various
map{}@ARGV transformations in their day-to-day programming.  I know I'm far
from the only one, as we've seen.  

One cannot but wonder how long has it been in the standard documentation?
Grepping for "map.*gz" in the pods and manpages of the following releases
(yeah, so I'm a perl packrat, not just a perl historian :-)

  perl1.0         perl-5.003      perl5.005_55    perl-5.6.0-RC1  perl-5.9.2
  perl4.036       perl-5.004      perl5.005_56    perl-5.6.0-RC3  perl-5.9.4
  perl5.001       perl-5.005      perl5.005_57    perl-5.6.0      perl-5.10.0
  perl5.001m      perl5.005_02    perl5.005_63    perl-5.8.7      
  perl-5.002      perl5.005_54    perl5.5.650     perl-5.8.8      

I find:

perl-5.005/pod/perlop.pod:    @ARGV = map { /\.(gz|Z)$/ ? "gzip -dc < $_ |" : $_ } @ARGV;
perl5.005_02/pod/perlop.pod:    @ARGV = map { /\.(gz|Z)$/ ? "gzip -dc < $_ |" : $_ } @ARGV;
perl5.005_54/pod/perlop.pod:    @ARGV = map { /\.(gz|Z)$/ ? "gzip -dc < $_ |" : $_ } @ARGV;
perl5.005_55/pod/perlop.pod:    @ARGV = map { /\.(gz|Z)$/ ? "gzip -dc < $_ |" : $_ } @ARGV;
perl5.005_55/pod/perlopentut.pod:    @ARGV = map { /^\.(gz|Z)$/ ? "gzip -dc $_ |" : $_  } @ARGV;
perl5.005_56/pod/perlop.pod:    @ARGV = map { /\.(gz|Z)$/ ? "gzip -dc < $_ |" : $_ } @ARGV;
perl5.005_56/pod/perlopentut.pod:    @ARGV = map { /^\.(gz|Z)$/ ? "gzip -dc $_ |" : $_  } @ARGV;
perl5.005_57/pod/perlop.pod:    @ARGV = map { /\.(gz|Z)$/ ? "gzip -dc < $_ |" : $_ } @ARGV;
perl5.005_57/pod/perlopentut.pod:    @ARGV = map { /^\.(gz|Z)$/ ? "gzip -dc $_ |" : $_  } @ARGV;
perl5.005_63/pod/perlop.pod:    @ARGV = map { /\.(gz|Z)$/ ? "gzip -dc < $_ |" : $_ } @ARGV;
perl5.005_63/pod/perlopentut.pod:    @ARGV = map { /^\.(gz|Z)$/ ? "gzip -dc $_ |" : $_  } @ARGV;
perl5.5.650/pod/perlop.pod:    @ARGV = map { /\.(gz|Z)$/ ? "gzip -dc < $_ |" : $_ } @ARGV;
perl5.5.650/pod/perlopentut.pod:    @ARGV = map { /^\.(gz|Z)$/ ? "gzip -dc $_ |" : $_  } @ARGV;
perl-5.6.0-RC1/pod/perlop.pod:    @ARGV = map { /\.(gz|Z)$/ ? "gzip -dc < $_ |" : $_ } @ARGV;
perl-5.6.0-RC1/pod/perlopentut.pod:    @ARGV = map { /^\.(gz|Z)$/ ? "gzip -dc $_ |" : $_  } @ARGV;
perl-5.6.0-RC3/pod/perlop.pod:    @ARGV = map { /\.(gz|Z)$/ ? "gzip -dc < $_ |" : $_ } @ARGV;
perl-5.6.0-RC3/pod/perlopentut.pod:    @ARGV = map { /^\.(gz|Z)$/ ? "gzip -dc $_ |" : $_  } @ARGV;
perl-5.6.0/pod/perlop.pod:    @ARGV = map { /\.(gz|Z)$/ ? "gzip -dc < $_ |" : $_ } @ARGV;
perl-5.6.0/pod/perlopentut.pod:    @ARGV = map { /^\.(gz|Z)$/ ? "gzip -dc $_ |" : $_  } @ARGV;
perl-5.8.7/pod/perlop.pod:    @ARGV = map { /\.(gz|Z)$/ ? "gzip -dc < $_ |" : $_ } @ARGV;
perl-5.8.7/pod/perlopentut.pod:    @ARGV = map { /^\.(gz|Z)$/ ? "gzip -dc $_ |" : $_  } @ARGV;
perl-5.8.8/pod/perlop.pod:    @ARGV = map { /\.(gz|Z)$/ ? "gzip -dc < $_ |" : $_ } @ARGV;
perl-5.8.8/pod/perlopentut.pod:    @ARGV = map { /^\.(gz|Z)$/ ? "gzip -dc $_ |" : $_  } @ARGV;
perl-5.9.2/pod/perlop.pod:    @ARGV = map { /\.(gz|Z)$/ ? "gzip -dc < $_ |" : $_ } @ARGV;
perl-5.9.2/pod/perlopentut.pod:    @ARGV = map { /^\.(gz|Z)$/ ? "gzip -dc $_ |" : $_  } @ARGV;
perl-5.9.4/pod/perlop.pod:    @ARGV = map { /\.(gz|Z)$/ ? "gzip -dc < $_ |" : $_ } @ARGV;
perl-5.9.4/pod/perlopentut.pod:    @ARGV = map { /^\.(gz|Z)$/ ? "gzip -dc $_ |" : $_  } @ARGV;
perl-5.10.0/pod/perlop.pod:    @ARGV = map { /\.(gz|Z)$/ ? "gzip -dc < $_ |" : $_ } @ARGV;
perl-5.10.0/pod/perlopentut.pod:    @ARGV = map { /^\.(gz|Z)$/ ? "gzip -dc $_ |" : $_  } @ARGV;

Perl 5.005 released on 1998-Jul-22, 
And the current day is 2008-Aug-02, 
slightly more than a decade later--something, I think, to bear in mind.  

And just how long *is* a decade in "internet-years", anyway? :-)
Multiple generations of programmers, I think.

And that's not even how long it's *worked*, just how long the documentation
has egged people on to doing it.  I know: culpa mea solaque, but I put it 
there to make things easier for people who woudln't've thought of it on there own.

--tom

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