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

[perl #54728] PathTools-3.27 triggers a bug in Perl

Thread Previous | Thread Next
From:
Victor Efimov via RT
Date:
August 6, 2013 11:42
Subject:
[perl #54728] PathTools-3.27 triggers a bug in Perl
Message ID:
rt-3.6.HEAD-2552-1375789339-1645.54728-15-0@perl.org
On Tue Aug 06 04:24:55 2013, davem wrote:
> On Mon, Aug 05, 2013 at 08:42:48AM -0700, Victor Efimov via RT wrote:
> 
> > Also, isn't this a misfeature?
> 
> I don't see why.
> >

a) is there a valid case when user indeed wants 'aa' =~ m/(.)/ to modify
$_[1], in code like this?

"2" =~ m/(.*)/;
print test1("1", $1), "\n";

sub test1 {
 'aa' =~ m/(.)/;
 return $_[0].'/'.$_[1];
}

b) I think using regexps with capture groups, before using $_[], or @_,
or &othersub; without expecting side effects is much more usable than
this feature.



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

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