Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Is Perl Truly an Object Oriented Language?

by nothingmuch (Priest)
on Dec 03, 2004 at 14:29 UTC ( [id://412139]=note: print w/replies, xml ) Need Help??


in reply to Re: Is Perl Truly an Object Oriented Language?
in thread Is Perl Truly an Object Oriented Language?

You also can't manipulate classes as if they were objects

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*

-nuffin
zz zZ Z Z #!perl

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://412139]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-23 11:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found