develooper Front page | perl.perl5.porters | Postings from November 2012

[perl #115834] Successfull match $_[0] =~ /foo(.+)/ overrides $_[0] if function called as foo($1)

Thread Previous
From:
Ed Avis via RT
Date:
November 21, 2012 19:33
Subject:
[perl #115834] Successfull match $_[0] =~ /foo(.+)/ overrides $_[0] if function called as foo($1)
Message ID:
rt-3.6.HEAD-17500-1353493698-1884.115834-15-0@perl.org
This is an issue which comes up perenially, see

http://thread.gmane.org/gmane.comp.lang.perl.perl5.porters/1607

for an earlier 'bug' report.

I do feel that the current behaviour is confusing, if every time a new
programmer hits a seeming bug it requires a detailed explanation from
one of the perl5-porters about why it's meant to work like that.  If
it's really unchangeable then calling foo($1) should issue a warning.

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=115834

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