Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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?
[shmem]: well, there are some builtins which don't have a prototype...
[Discipulus]: eh eh.. i was looking in toke.c but dunno if is already used
[shmem]: oh the whitespace in the regex got condensed, meh
[shmem]: should be /^ {7}(\w+)/ or such
[shmem]: ...at least for my perldoc on Linux debian 8
[Discipulus]: mmh.. at themomemt i just an old 5.8 and outputs just GLOBAL::

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2017-05-23 10:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?