develooper Front page | perl.perl5.porters | Postings from December 2007

Re: Changes in m//m in 5.10

Thread Previous | Thread Next
From:
Andy Lester
Date:
December 22, 2007 15:11
Subject:
Re: Changes in m//m in 5.10
Message ID:
426191E0-B06A-40BA-B46A-637296DE92B2@petdance.com

On Dec 22, 2007, at 5:07 PM, Joshua ben Jore wrote:

> That would be hilarious as it'd presumably throw warnings at people
> who uselessly used the /msx modifiers as suggested by Damian's PBP.
> Mostly I find uselessly adding /msx makes it harder to read code
> because I have to guess more about intent and it's noise. I'd be all
> for this sort of warning.


We're having just this discussion on the perlcritic mailing list right  
now.

Personally, I have no problem with warning about the useless /sm.   
It's useful to tell someone "you're doing something useless", just  
like an expression in void context.

The reflexive /sm is like backslashing every non-alpha character in a  
regex because the author can't remember what's a metacharacter and  
what isn't, so he writes things like qr/Bang\-Bang\!/ because he  
thinks that - and ! might maybe possibly be meta.

--
Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance





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