Created
December 14, 2016 01:42
-
-
Save FCO/8bb0f2459b294af3930ea0731e71f10e 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
MacBook-Pro-de-Fernando:test fernando$ cat ToUse.pm6 | |
unit class ToUse; | |
has %!bla; | |
my $instance = ::?CLASS.bless; | |
method new {!!!} | |
method instance { | |
$instance | |
} | |
method getBla is export { | |
%!bla | |
} | |
multi trait_mod:<is>(Routine $r, :$fuzzed!) is export { | |
ToUse.instance.getBla(){$r.name} = True; | |
} | |
MacBook-Pro-de-Fernando:test fernando$ cat Use.pm6 | |
unit module Use; | |
use ToUse; | |
sub bla() is fuzzed {} | |
MacBook-Pro-de-Fernando:test fernando$ cat main.p6 | |
use Use; | |
use ToUse; | |
say ToUse.instance.getBla | |
MacBook-Pro-de-Fernando:test fernando$ perl6 -I. main.p6 | |
{} | |
MacBook-Pro-de-Fernando:test fernando$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment