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

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

Thread Previous | Thread Next
From:
James E Keenan via RT
Date:
May 20, 2013 23:06
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-2650-1369091165-1956.118047-15-0@perl.org
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.

Thank you very much.
Jim Keenan


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

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