Skip Menu |
Queue is disabled
This queue is disabled and you may not create new tickets in it. Disabled queues are usually because the distribution was merged with another or changed names. Sometimes they are the end result of a bad autocreate from PAUSE data before anyone noticed.
Report information
Id: 126097
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: zefram [at] fysh.org
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [BUG] lossy .perl for 0 but True
Date: Fri, 18 Sep 2015 20:02:17 +0100
From: Zefram <zefram [...] fysh.org>
To: rakudobug [...] perl.org
Download (untitled) / with headers
text/plain 425b
If .perl is used to serialise a value of 0 but True, it doesn't represent the but-True aspect. Evaling the result produces a mundane false zero. .WHICH and eqv recognise the difference. $ ./perl6 -e 'my $a = 0 but True; say $a.perl; my $b = $a.perl.EVAL; say ?$a, " ", ?$b; say $a.WHICH, " ", $b.WHICH; say $b eqv $a' 0 True False Int+{<anon>}|0 Int|0 False The same goes for many other values modified by "but". -zefram


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org