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

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

by liz (Monsignor)
on Sep 14, 2003 at 18:56 UTC ( [id://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

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://291428]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-03-19 10:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found