Created
November 1, 2016 11:29
-
-
Save niner/02f1d23a928c201b6ba328b9e6388df8 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
nine@sphinx:~/test/multiver> tree | |
. | |
├── A-1 | |
│ ├── lib | |
│ │ └── A.pm6 | |
│ └── META.info | |
├── A-2 | |
│ ├── lib | |
│ │ └── A.pm6 | |
│ └── META.info | |
└── lib | |
├── A1User.pm6 | |
└── A2User.pm6 | |
5 directories, 6 files | |
nine@sphinx:~/test/multiver> cat A-1/lib/A.pm6 | |
unit class A; | |
method a() { | |
say "A1!"; | |
} | |
nine@sphinx:~/test/multiver> cat A-1/META.info | |
{ | |
"name" : "A", | |
"version" : "0.1", | |
"perl" : "6.c", | |
"author" : "github:niner", | |
"authors" : [ "Stefan Seifert" ], | |
"description" : "Multi version load test", | |
"provides" : { | |
"A" : "lib/A.pm6" | |
}, | |
"license" : "http://www.perlfoundation.org/artistic_license_2_0" | |
} | |
nine@sphinx:~/test/multiver> cat A-2/lib/A.pm6 | |
unit class A; | |
method a() { | |
say "A2!"; | |
} | |
method b() { | |
say "B2!"; | |
} | |
nine@sphinx:~/test/multiver> cat A-2/META.info | |
{ | |
"name" : "A", | |
"version" : "0.2", | |
"perl" : "6.c", | |
"author" : "github:niner", | |
"authors" : [ "Stefan Seifert" ], | |
"description" : "Multi version load test", | |
"provides" : { | |
"A" : "lib/A.pm6" | |
}, | |
"license" : "http://www.perlfoundation.org/artistic_license_2_0" | |
} | |
nine@sphinx:~/test/multiver> cat lib/A1User.pm6 | |
unit class A1User; | |
use A:ver(v0.1); | |
method a() { | |
A.a; | |
} | |
nine@sphinx:~/test/multiver> cat lib/A2User.pm6 | |
unit class A2User; | |
use A:ver(v0.2); | |
method a() { | |
A.a; | |
} | |
nine@sphinx:~/test/multiver> perl6 -Ilib -e 'use A1User; use A2User; A1User.a; A2User.a;' | |
A1! | |
A2! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment