# New Ticket Created by  Zefram 
# Please include the string:  [perl #126097]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=126097 >


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

Reply via email to