Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: Re: Re: perl OO - to use or not to use

by liz (Monsignor)
on Sep 14, 2003 at 18:56 UTC ( #291428=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: perl OO - to use or not to use
in thread perl OO - to use or not to use

With OO, the subroutine "meth" could be inherited (exist in another namespace from which the object inherits). When called as a subroutine, the subroutine must exist in the current namespace (or some pretty heavy AUTOLOAD magic should be involved).

Liz


Comment on Re: Re: Re: Re: perl OO - to use or not to use
Re: Re: Re: Re: Re: perl OO - to use or not to use
by IlyaM (Parson) on Sep 14, 2003 at 19:59 UTC
    Other important difference is that in case of OO syntax caller in general doesn't know how $obj will handle method call (i.e. caller doesn't know which subroutine in which package is going to be called) as it depends on the class of $obj.

    --
    Ilya Martynov, ilya@iponweb.net
    CTO IPonWEB (UK) Ltd
    Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net
    Personal website - http://martynov.org

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://291428]
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: (7)
As of 2014-09-16 05:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (156 votes), past polls