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

Owner: Nobody
Requestors: elizabeth <liz [at] dijkmat.nl>
Cc:
AdminCc:

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



From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
To: rakudobug [...] perl.org
Date: Fri, 16 Dec 2016 22:14:17 +0100
Subject: there's no match for Any aka /./ codegens differently from m/./
Download (untitled) / with headers
text/plain 608b
$ 6 'm/./; dd $/' No such method 'match' for invocant of type ‘Any' $ 6 '/./; dd $/' Nil $/ = Nil Apparently the codegen of m/./ introduces a call to .match, whereas /./ codegens to something that does *not* call .match. I can only assume that’ because it assumes there can be named parameters (even though we could see that that is not the case). So fixing the codegen in this case would not solve this problem: $ 6 'm:2nd/./; dd $/' No such method 'match' for invocant of type ‘Any' The only way I see we could fix this, is by adding an Any.match or a Mu.match, that would just set $/ to Nil.
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
To: "Elizabeth Mattijsen (via RT)" <perl6-bugs-followup [...] perl.org>
Date: Mon, 19 Dec 2016 20:39:14 +0100
Subject: Re: [perl #130363] there's no match for Any aka /./ codegens differently from m/./
Download (untitled) / with headers
text/plain 1011b
Fixed with 3fe5893 , tests needed. Show quoted text
> On 16 Dec 2016, at 22:14, Elizabeth Mattijsen (via RT) <perl6-bugs-followup@perl.org> wrote: > > # New Ticket Created by Elizabeth Mattijsen > # Please include the string: [perl #130363] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=130363 > > > > $ 6 'm/./; dd $/' > No such method 'match' for invocant of type ‘Any' > > $ 6 '/./; dd $/' > Nil $/ = Nil > > > Apparently the codegen of m/./ introduces a call to .match, whereas /./ codegens to something that does *not* call .match. I can only assume that’ because it assumes there can be named parameters (even though we could see that that is not the case). > > So fixing the codegen in this case would not solve this problem: > > $ 6 'm:2nd/./; dd $/' > No such method 'match' for invocant of type ‘Any' > > > The only way I see we could fix this, is by adding an Any.match or a Mu.match, that would just set $/ to Nil.


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