-
-
Save masak/3b2e4b16482781431b3b to your computer and use it in GitHub Desktop.
exporting a multi
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
$ cat A.pm | |
multi foo(Int) is export { | |
say "Int"; | |
} | |
multi foo(Str) { | |
say "Str"; | |
} | |
$ perl6 -I. -e 'use A; foo(42); foo("OH HAI")' | |
Int | |
Str |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, yes your example works but the problem is more complicated than that.
in script: