# New Ticket Created by Allison Randal # Please include the string: [perl #41528] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41528 >
Leo suggests merging the 'init' and 'init_pmc' vtable entries into a single 'init' entry that accepts a variable number of arguments. Note: this is currently not possible for low-level C PMCs, as they can't handle optional arguments. Suggested example code for functionality: .sub main :main .local pmc cl, o cl = newclass 'MyClass' o = new 'MyClass' o = new 'MyClass', $P0 .end .namespace ['MyClass'] .sub init :method :vtable .param pmc initializer :optional print "init was called\n" .end .sub init_pmc :method :vtable .param pmc initializer print "should never be called\n" .end Allison