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

Owner: Nobody
Requestors: lloyd.fourn [at] gmail.com
Cc:
AdminCc:

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



Date: Fri, 14 Aug 2015 21:25:30 +1000
From: Lloyd Fournier <lloyd.fourn [...] gmail.com>
Subject: [BUG] GLOBAL is NQPMu in sub EXPORT which breaks indirect calls
To: rakudobug [...] perl.org
Download (untitled) / with headers
text/plain 589b
# lib/Foo.pm
use Test;
sub EXPORT {
      say GLOBAL.^name; #-> NQPMu
      say Test; #-> (Test)
      say ::('Test');  #-> Cannot find method 'EXISTS-KEY': no method cache and no .^find_method
}
#This is perl6 version 2015.07.1-111-ge0f7259 built on MoarVM version 2015.07-8-gb8fdeae 
=======

Test is just there as an example symbol for a valid indirect call. This was working not too long ago afaik.

My amateur opinion is because


INDIRECT_NAME_LOOKUP relies on GLOBAL being defined and for some reason it is NQPMu.


Subject: Re: [perl #125808] AutoReply: [BUG] GLOBAL is NQPMu in sub EXPORT which breaks indirect calls
To: perl6-bugs-followup [...] perl.org
From: Lloyd Fournier <lloyd.fourn [...] gmail.com>
Date: Sun, 16 Aug 2015 15:35:07 +1000
Download (untitled) / with headers
text/plain 1.4k
Workaround: An empty BEGIN {} before 'use Foo', makes GLOBAL work in EXPORT.

On Fri, Aug 14, 2015 at 9:26 PM, perl6 via RT <perl6-bugs-followup@perl.org> wrote:
Show quoted text
Greetings,

This message has been automatically generated in response to the
creation of a trouble ticket regarding:
        "[BUG] GLOBAL is NQPMu in sub EXPORT which breaks indirect calls",
a summary of which appears below.

There is no need to reply to this message right now.  Your ticket has been
assigned an ID of [perl #125808].

Please include the string:

         [perl #125808]

in the subject line of all future correspondence about this issue. To do so,
you may reply to this message.

                        Thank you,
                        perl6-bugs-followup@perl.org

-------------------------------------------------------------------------
# lib/Foo.pm
use Test;
sub EXPORT {
      say GLOBAL.^name; #-> NQPMu
      say Test; #-> (Test)
      say ::('Test');  #-> Cannot find method 'EXISTS-KEY': no method cache
and no .^find_method
}
#This is perl6 version 2015.07.1-111-ge0f7259 built on MoarVM version
2015.07-8-gb8fdeae
=======

Test is just there as an example symbol for a valid indirect call. This was
working not too long ago afaik.

My amateur opinion is because

https://github.com/rakudo/rakudo/blob/nom/src/core/operators.pm#L530

INDIRECT_NAME_LOOKUP relies on GLOBAL being defined and for some reason it
is NQPMu.




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