A suitable implementation of UNIVERSAL::new could provide similar default behavior to Perl 6's new. So could a suitable implementation of UNIVERSAL::init - and would be more friendly to "immigrants" from other languages' OO systems - Class::init will be called with an already blessed object, so will only need to perform initializations (and, maybe, validate supplied parameters). (Not surprisingly, overriding new in Perl 6 requires the new class's new method to use bless to create the new object.)
In reply to Re^2: OO systems and Perl 5 (Was: Recap: Future of Perl 5)
by RonW
in thread OO systems and Perl 5 (Was: Recap: Future of Perl 5)
by RonW
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |