Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: perl oop concept

by sundialsvc4 (Abbot)
on Dec 04, 2012 at 16:41 UTC ( #1007114=note: print w/replies, xml ) Need Help??

in reply to perl oop concept

By all means, don’t make this a voyage of discovery.   Read the various perldocs on OOP in Perl, and seek out a few recent Perl modules at   Read the source code of some of them.   (Or just look at the modules already installed on your own system.)   Copy their practices exactly.

Remember the essence of what bless does:   it associates a package-name with some data-object.   It thereby enables the $foo->subname vernacular to be used.   Perl knows to look in the associated package to find the routine, and it calls that routine with $foo as the first parameter.   That’ s basically it.   The data object didn’t cease to be what it is ... the rules for accessing it as a data object haven’t really changed ... it’s merely wearing a halo now, and glowing slightly (and wearing a beneficent smile ...).

(Am I simplifying?   Of course.   But not really over-simplifying, all in the name of simple clarity.)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1007114]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2018-06-19 22:35 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (115 votes). Check out past polls.