Created
May 23, 2018 03:14
-
-
Save zoffixznet/eb5863c40a1bcff441654a400d76fe74 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
2018.04.1 zoffix@VirtualBox/tmp/tmp.eGQMrzQNrn$ cat Amod.pm6 | |
unit module Amod; | |
our sub foo { say "foo from Amod" } | |
2018.04.1 zoffix@VirtualBox/tmp/tmp.eGQMrzQNrn$ cat Bmod.pm6 | |
unit module Bmod; | |
our sub foo { say "foo from Bmod" } | |
2018.04.1 zoffix@VirtualBox/tmp/tmp.eGQMrzQNrn$ cat C.pm6 | |
use Amod; | |
use Bmod; | |
sub EXPORT(--> Map:D) | |
{ | |
my %EXPORT = Map.new( | |
'A' => Amod, | |
'B' => Bmod | |
); | |
} | |
unit module C; | |
# vim: set ft=perl6 fdm=marker fdl=0: | |
2018.04.1 zoffix@VirtualBox/tmp/tmp.eGQMrzQNrn$ perl6 -I. -MC -e 'A::foo; B::foo' | |
foo from Amod | |
foo from Bmod |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment