Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Object Oriented Perl - very basic guide

by morgon (Deacon)
on May 16, 2014 at 01:06 UTC ( #1086232=note: print w/ replies, xml ) Need Help??


in reply to Object Oriented Perl - very basic guide

$object_instance -> set_state ( "here is a new state" );
is translated by perl (because it knows it's a 'MyObject' because of that 'bless') into:
MyObject::set_state ( $object_instance, "here is a new state" );
This is actually not quite true. "set_state" could be implemented in a base-class and in the general case that base-class might not be known at compile-time, so Perl cannot do any "translations" but actually has to perform a search for the proper method in the parent-class hierarchie at run-time.

At least that is my understanding...


Comment on Re: Object Oriented Perl - very basic guide
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2014-09-15 03:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (145 votes), past polls