# New Ticket Created by # Please include the string: [perl #125634] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=125634 >
How to reproduce: cdc:~/golf$ cat lib/Golf.pm6 unit module Golf; multi sub trait_mod:<is>(Routine $routine, :$wrapped!) { $routine.wrap: -> |args { callwith(|args) } } sub foo is export is wrapped { say 'OK' } cdc:~/golf$ panda-build Compiling lib/Golf.pm6 to mbc cdc:~/golf$ PERL6LIB=$PWD/blib/lib perl6 -e 'use Golf; foo' Cannot invoke this object (REPR: Null, cs = 0) in block at lib/Golf.pm6:4 in any enter at src/gen/m-Metamodel.nqp:3560 Expected result -- same as without precompilation: cdc:~/golf$ PERL6LIB=$PWD/lib perl6 -e 'use Golf; foo' OK