[Israel.pm] Objects and classes

Yuval Kogman lists at woobling.org
Wed Jan 14 14:43:27 PST 2004

On Wed, Jan 14, 2004 at 10:13:16PM +0000, Mikhael Goikhman wrote:

> You should read "perldoc perltoot" man page if you are not familar with
> the Perl OO model.

There's also perlboot, perlobj and perlbot. perlboot is like perltoot, and
perlbot is the bag of tricks - it's got lots to do with Perl's object
system specifically. perlobj is a sort of reference to Perl's object system.

> I think that the Yuval's answer caused your confusion. He suggested

Make that assumed. I think this may be the root of all of this

> that Apache::RecquestIO inherits from Apache::RequestRec, just like IO::File
> inherits from IO::Handle. I am not a big Apache programmer, but this page
> hints that Apache::RequestIO does not inherit from Apache::RequestRec:
>   http://perl.apache.org/docs/2.0/api/Apache/RequestIO.html
> It is impossible to understand the class diagram from this page, but I
> would think there is some delegation mechanism in Apache::RequestRec

It also smells to me like a 'has-a' or 'uses' relationship, depending
on how you call those. I don't know - the docs are very vague.

> Hey, in Ruby you may even automatically change the class inheritance
> of a single object, not just the whole class. Now this is a dynamism. :)

Nothing stops you from writing that in Perl, aside from the fact that
it isn't builtin... =)

Some insightful projects:

     and friends

and my own project Object::Meta::Plugin implement object systems,
whose objects can interact with perl's builtin object system, but
which work differently.

It's actually much easier than it sounds =)

Someday, when I'll finally learn Ruby like I promised myself, I will
probably enjoy it.

 ()  Yuval Kogman <nothingmuch at woobling.org> 0xEBD27418  perl hacker &
 /\  kung foo master: /me does not drink tibetian laxative tea: neeyah!

More information about the Perl mailing list