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

[perl #29070] Deparsing v-string operands to ~ loses the ~

Thread Next
From:
Father Chrysostomos via RT
Date:
December 23, 2011 09:59
Subject:
[perl #29070] Deparsing v-string operands to ~ loses the ~
Message ID:
rt-3.6.HEAD-14510-1324663133-60.29070-15-0@perl.org
On Thu Jul 26 05:08:19 2007, jpeacock@rowman.com wrote:
> Better to patch
> B::Deparse to make an effort to see whether the original string
> representation
> is still valid (though I have this vague memory that code in toke.c is
> not part
> of the public API, and hence is not available to use here).

It’s not just B::Deparse, but the version module, too, that is affected:

$ ./perl -Ilib -le 'print version->new(~v165);
v165

And constant folding is not where the problem lies:

$ ./perl -Ilib -le 'print new version ~$_ for "\xce", v2, "\xcc"'
1
v2
3


-- 

Father Chrysostomos


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

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