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



From: Zefram <zefram [...] fysh.org>
Subject: [BUG] Capture.perl mishandles Pairs as positional args
To: rakudobug [...] perl.org
Date: Wed, 17 Aug 2016 23:35:44 +0100
Download (untitled) / with headers
text/plain 573b
Using .WHICH as a handy means of introspection: Show quoted text
> \(:a).WHICH
Capture|a(Bool|1) Show quoted text
> \((:a)).WHICH
Capture|(Pair|Str|a|Bool|1) Show quoted text
> \(:a).perl
\(:a) Show quoted text
> \((:a)).perl
\(:a) Show quoted text
> \(:a).perl.EVAL.WHICH
Capture|a(Bool|1) Show quoted text
> \((:a)).perl.EVAL.WHICH
Capture|a(Bool|1) On the Capture that has a constant Pair as a positional argument, .perl emits code that presents the Pair literal as a named argument. I'd expect .perl to ensure correct round-tripping by using extra parens (as I did on input) or some equivalent circumlocution to force interpretation as a positional argument. -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