Workaround: An empty BEGIN {} before 'use Foo', makes GLOBAL work in EXPORT.

On Fri, Aug 14, 2015 at 9:26 PM, perl6 via RT <[email protected]>
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 #125808]
>
> in the subject line of all future correspondence about this issue. To do
> so,
> you may reply to this message.
>
>                         Thank you,
>                         [email protected]
>
> -------------------------------------------------------------------------
> # 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.
>
>

Reply via email to