Last active
October 10, 2018 21:44
-
-
Save barcharcraz/0e0ba8f64b86544856e156ee1573fe1c 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
# file Base.pm6 | |
use v6; | |
unit module Base; | |
use Base::Test; | |
# file Base/Test.pm6 | |
use v6; | |
unit module Base; | |
our sub foo { say "foo"; } | |
# repl | |
> use Base; | |
> Base::foo; | |
Could not find symbol '&foo' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Those are two separate
module
s with the same name.Perl 6 does not have the same simple namespace that Perl 5 has.
Example/A.pm6
Example/B.pm6
That prints:
You can do the following though:
Base.pm6
Base/Test.pm6
REPL