On Tue, 24 May 2005, Leopold Toetsch wrote: > Multi subs and especially multi methods are barely tested. 'pmc' or '_' > should match 'Any' PMC, so that's for sure a bug. Can you please provide > a test-like sample file to investigate, thanks.
here you go. it should print "string PMC nothing", but instead prints out "string nothing nothing". interestingly, if you change @MULTI(Foo) to @MULTI(_), it all works, but that seems more of a band-aid solution for this particular case. -jeff --- .namespace ['Foo'] .sub bar method, @MULTI(Foo, string) print "string\n" .end .sub bar method, @MULTI(Foo, pmc) print "PMC\n" .end .sub bar method, @MULTI(Foo) print "nothing\n" .end .namespace [''] .sub main @MAIN newclass $P0, 'Foo' $I0 = find_type 'Foo' $P0 = new $I0 $P0.'bar'('Bar!') $P1 = new PerlString $P1 = "Bar!" $P0.'bar'($P1) $P0.'bar'() .end