In the following snippet (from t/pmc/mmd.t) the two function calls dispatch to the correct subroutine:

.namespace ["main"]
.sub main @MAIN
    p("ok 1\n")
    p("-twice", "ok 2\n")
.end

.namespace [""]
.sub p @MULTI(string)
...
.sub p @MULTI(string, string)

* the two multi subs "p" in the same namespace cause the creation of a MultiSub PMC with the name "p"
* the two multi subs get a mangled (long name) entry in the globals:
"[EMAIL PROTECTED]" and "[EMAIL PROTECTED]@STRING"


Have fun,
leo



Reply via email to