Hi, BÁRTHÁZI András wrote: >>> $wte = new WTE; >>> $wte.register('input', &my_input_widget); >>> >>> I don't prefer it, to be 20-30 register line in my programs, that >>> does nothing, just register. >> >> maybe something like this? >> >> class MyWTE is WTE { >> method input (...) {...} >> method some_other_thing_you_would_have_had_to_register (...) {...} >> ...; >> } > > And how the WTE class will be able to call these methods?
you'd have to instantiate your MyWTE class instead of the original WTE. Then you'd simple call the methods on your MyWTE object: my $wte = MyWTE.new; $wte.input(...); $wte.some_other_thing_you_would_have_had_to_register(...); But I don't know if that's convenient in your program/module. --Ingo -- Linux, the choice of a GNU | When cryptography is outlawed, bayl bhgynjf generation on a dual AMD | jvyy unir cevinpl! Athlon! |