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

Re: Proof of concept code for doing magic ARGV processing in perl

Thread Previous
From:
Carl Franks
Date:
August 3, 2008 00:52
Subject:
Re: Proof of concept code for doing magic ARGV processing in perl
Message ID:
4f352aae0808030052g68d0ebf3j1d6ab8bce575ac7f@mail.gmail.com
2008/8/2 Ed Avis <eda@waniasset.com>:
> I suggested that instead of continuing to use perl's builtin special handling of
> the ARGV filehandle, it would be better to implement magical arg processing in
> perl, for the following reasons:
>
> - Even if you do want magic, the existing behaviour of <> is not ideal.  It
> shouldn't end up writing files instead of reading them.  A reimplementation in
> perl code can more easily catch and warn about these cases.

My interpretation of the general opinion of the many recent mails
regarding this (and my own position) is:
"the current behaviour is not a bug - so the current behaviour should
not be broken".

Provide a non-magical alternative - and tell people to use that as default.
And anyone that didn't read the documentation, and is bothered about
it, can go back and change their code to use that.
Don't make people that read the documentation have to go back and
change their (what, 20 years worth of?) code.

IMNSHO :-)

Cheers,
Carl

Thread Previous


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