# New Ticket Created by  grond...@yahoo.fr 
# Please include the string:  [perl #128010]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=128010 >


In file A.pm6 :    unit class A ; our sub f {}
In file B.pm6 :    unit role B ;   use A ; &A ::f ;

$ perl6 -I. -e ‘use B ; class :: does B {} ;’
===SORRY!=== Error while compiling -e
Could not instantiate role 'B':
Cannot find method 'package_at_key': no method cache and no .^find_method
at -e:1

Notice that &A ::f is not even called, only its reference is used in void 
context.

Also notice that without explicit compilation units it works fine :

$ perl6 -e ‘class A { our sub f {} } ; role B { &A::f } ; class :: does B {} ;’


Reply via email to