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

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

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



To: "rakudobug [...] perl.org" <rakudobug [...] perl.org>
Date: Sat, 26 Dec 2015 14:29:01 +0000
From: Lloyd Fournier <lloyd.fourn [...] gmail.com>
Subject: precomp - BEGIN inside EXPORT::DEFAULT cannot invoke this object
Download (untitled) / with headers
text/plain 185b
#lib/beginprecomp.pm
my package EXPORT::DEFAULT {
    BEGIN {
        OUR::{'&foo'} = sub (|) { say "foo" }
    }
}

perl6 -Ilib -e 'use beginprecomp; foo'
#!>Cannot invoke this object
RT-Send-CC: rakudobug [...] perl.org
Download (untitled) / with headers
text/plain 330b
A golfed case of a closure with the same problem: MyTest.pm6: BEGIN { -> { note } }(); $ perl6 -I. -e 'use MyTest' ===SORRY!=== Cannot invoke this object Some debugging shows that inside the closure, PROCESS:: is null, and changing the code above to: BEGIN { temp PROCESS::; -> { note } }() made that survives precompilation.


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