Skip to content

Instantly share code, notes, and snippets.

Created July 17, 2015 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/b794343a6e6713fca614 to your computer and use it in GitHub Desktop.
Save anonymous/b794343a6e6713fca614 to your computer and use it in GitHub Desktop.
Using a compiled (mbc) wrapping trait: Cannot invoke this object (REPR: Null, cs = 0)
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 { ... }
cdc:~/golf$ panda-build
Compiling lib/Golf.pm6 to mbc
cdc:~/golf$ PERL6LIB=$PWD/blib/lib perl6 -e 'use Golf; puts("OK")'
Cannot invoke this object (REPR: Null, cs = 0)
in block at lib/Golf.pm6:7
in any enter at src/gen/m-Metamodel.nqp:3560
cdc:~/golf$ PERL6LIB=$PWD/lib perl6 -e 'use Golf; puts("OK")'
OK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment