Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I can't recommend some of this advice; it looks prone to making messes. package dog;Lowercase module names are, by convention, pragmas. return(bless(dog->new(),$class));Why double bless? If the parent constructor is at all sane, it allows subclassing. my $doggie = new cockerSpaniel();The indirect method invocation syntax is fraught with peril; it's ambiguous to parse and Perl occasionally guesses incorrectly depending on the compilation order of your code. Also inheritance is not an essential part of object orientation. Arguably neither is encapsulation. You're absolutely right about object design being important. Most tutorials never teach that, and it's vital to writing effective OO. In reply to Re^2: kind of effort required for learning OO perl ?!
by chromatic
|
|