develooper Front page | perl.perl5.porters | Postings from May 2010

Re: PATCH: [perl #58182] partial, "The Unicode Bug". Addunicodesemantics for \s, \w

Thread Previous | Thread Next
From:
Ben Morrow
Date:
May 20, 2010 04:57
Subject:
Re: PATCH: [perl #58182] partial, "The Unicode Bug". Addunicodesemantics for \s, \w
Message ID:
20100520115709.GA15331@osiris.mauzo.dyndns.org
Quoth smueller@cpan.org (Steffen Mueller):
> Hi all,
> 
> Zefram wrote:
> > Eric Brine wrote:
> >> Since L<feature> is used to introduce features that are not backwards
> >> compatible, using C<< -E'...' >> instead of C<< -e'use 5.014; ...' >> may
> >> result in broken code when Perl is upgraded.
> > 
> > I thought that was implicit, and very obviously so, in the definition
> > of -E.  It's the inherent tradeoff, the price one pays for having such
> > a short shorthand.  But I wouldn't object to it being made explicit.
> 
> I agree with Zefram. This backwards-incompatible behavior is the *whole 
> point* of -E.
> 
> FWIW, I think documenting the current equivalent of -E (i.e. -e 'use 
> 5.0XX;') is at best adding noise to the documentation. The perl core may 
> have many problems but certainly, none of those is *lack* of docs.

Is it worth documenting the shorter version of that, that is

    perl -M5.10.0 -e'...'

? That seems like a good compromise, to me, for people who aren't
actually typing this into a shell. I realise it's an obvious consequence
of other features, but it might be worth trying to push people in the
direction of using it instead of -E. Otherwise, in five years' time,
we'll get people saying 'but you can't add anything to -E! I've got
four-and-a-half million one-liners that will *break*!'

Ben


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