Skip Menu |
Report information
Id: 126097
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: zefram [at]

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 [...]>
To: rakudobug [...]
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 infrastructure.

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