-
-
Save eikef/7de3095f0034ea17b2c85710df1faf76 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test.pl produces | |
test, successfully wrapped | |
a | |
test2.pl produces | |
Cannot invoke this object (REPR: Null; VMNull) | |
in block at (...)testimport.pm (testimport) line 7 | |
in any enter at gen/moar/m-Metamodel.nqp line 4012 | |
in block <unit> at test2.pl line 6 | |
Unfortunately I am at a loss as to why. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl6 | |
use v6; | |
multi sub trait_mod:<is>(Routine:D $r, :$wrapped!) { | |
$r.wrap: -> |args { | |
put "test, successfully wrapped"; | |
callsame | |
} | |
} | |
sub test(Str $a) is wrapped { | |
$a.say | |
} | |
test("a"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl6 | |
use v6; | |
use testimport; | |
test("a"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl6 | |
unit module testimport; | |
multi sub trait_mod:<is>(Routine:D $r, :$wrapped!) { | |
$r.wrap: -> |args { | |
put "test, successfully wrapped"; | |
callsame | |
} | |
} | |
sub test(Str $a) is wrapped is export { | |
$a.say | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment