in reply to Re: Is Perl Truly an Object Oriented Language?
in thread Is Perl Truly an Object Oriented Language?
Well, in perl someone could write a Class::AsObject module which injects methods like delete_symbol, create_subclass($name), add_field, add_method, and so forth into the UNIVERSAL namespace. These methods simply work as class methods, with the instance data sort of being the symbol table hash that the class takes up.
$r = Dog->create_subclass("Rottweiler"); # eq Dog::Rottweiler $r->add_method(bark => sub { print "roar" });
*shudder*
|
|---|