1 |
The object model in Perl5 is not as clear as in Java as the concepts are mixed up with the implementation.
|
2 |
We see same flaws in JavaScript where we "violate" modular programming principles by mixing concept and implementation in the technology which is precisely designed to help programmer keep these separate in his or her own programs!
|
3 |
Objects are references -- not directly variables -- they are typically references returned from subroutines as anonymous datastructures
-
objects (references) must be "blessed" so they remember what class (module or package) they come from
-
bless ($self, $class); return $self; # is classic way for a constructor subroutine new to end with $self the datastructure you wish to be stored in object
|