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

[perl #118047] "Replacement list is longer than search list" warning invalid in case of tr's /c flag used

Thread Previous
From:
Father Chrysostomos via RT
Date:
June 20, 2013 03:42
Subject:
[perl #118047] "Replacement list is longer than search list" warning invalid in case of tr's /c flag used
Message ID:
rt-3.6.HEAD-2552-1371699748-1799.118047-15-0@perl.org
On Mon May 20 16:06:05 2013, jkeenan wrote:
> On Sat May 18 07:42:56 2013, pasky@ucw.cz wrote:
> > 
> > This is a bug report for perl from pasky@ucw.cz,
> > generated with the help of perlbug 1.39 running under perl 5.14.2.
> > 
> > 
> > -----------------------------------------------------------------
> > [Please describe your issue here]
> > 
> > A snippet like `use warnings; $a = 'abc'; $a =~ y// /c;` will
> > produce a warning "Replacement list is longer than search list"
> > even though in this case, the effective search list is the full
> > character set, which is longer than the replacement list.
> > 
> > Perl should either first produce the complement before checking
> > for this warning, or do not warn in case of the /c flag at all.
> > 
> > I have also tested this with Perl-5.16.0 and the issue is present
> > there as well.
> > 
> > 
> 
> Phenomenon confirmed on 5.18.0.  This will need diagnosis by someone who
> understands function S_pmtrans in op.c.

I stopped it from warning yesterday, in commit b8c388a94dc7, but I
forgot to update this ticket till now.

-- 

Father Chrysostomos


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

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