Skip Menu |
Report information
Id: 129007
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)

From: Zefram <zefram [...]>
Date: Sat, 20 Aug 2016 02:46:24 +0100
To: rakudobug [...]
Subject: [BUG] Baggy.perl confused by type objects
Download (untitled) / with headers
text/plain 519b
Show quoted text
> ((Nil) => 2).Bag.perl
(Nil=>2).Bag Show quoted text
> ((Nil) => 2).Bag.perl.EVAL.perl
("Nil"=>2).Bag .perl.EVAL doesn't round-trip a Bag where any of the keys in the bag deparses as an identifier. This happens because it's rolling its own Pair deparsing and runs into autoquoting. This is the same problem that was seen with Pair.perl in [perl #126890]. The reliable fix would be for Baggy.perl to construct Pair objects and call .perl on them, so that the logic to handle this only needs to be in one place (Pair.perl). -zefram
To: perl6 via RT <perl6-bugs-followup [...]>
Subject: Re: [perl #129007] [BUG] Baggy.perl confused by type objects
From: Zefram <zefram [...]>
Date: Sat, 20 Aug 2016 03:04:32 +0100
Download (untitled) / with headers
text/plain 359b
Additional: it also gets confused by some Pair objects as keys: Show quoted text
> (("a b" => "c") => 2).Bag.perl
("a b" => "c"=>2).Bag Show quoted text
> (("a b" => "c") => 2).Bag.perl.EVAL.perl
Type check failed in assignment; expected Int but got Pair (:c(2)) in block <unit> at EVAL_15 line 1 in block <unit> at <unknown file> line 1 Invoking Pair.perl would fix this too. -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