Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created May 23, 2018 03:14
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 zoffixznet/eb5863c40a1bcff441654a400d76fe74 to your computer and use it in GitHub Desktop.
Save zoffixznet/eb5863c40a1bcff441654a400d76fe74 to your computer and use it in GitHub Desktop.
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