Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLOBAL is NQPMu in sub EXPORT which breaks indirect calls #4470

Open
p6rt opened this issue Aug 14, 2015 · 2 comments
Open

GLOBAL is NQPMu in sub EXPORT which breaks indirect calls #4470

p6rt opened this issue Aug 14, 2015 · 2 comments
Labels

Comments

@p6rt
Copy link

@p6rt p6rt commented Aug 14, 2015

Migrated from rt.perl.org#125808 (status was 'new')

Searchable as RT125808$

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Aug 14, 2015

From @LLFourn

# 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.

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Aug 17, 2015

From @LLFourn

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​:

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 #&#8203;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@&#8203;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.

@p6rt p6rt added the bootstrap label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.