Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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

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
Node Status?
node history
Node Type: note [id://291428]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2016-12-10 05:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (160 votes). Check out past polls.