On Wednesday, October 1, 2003, at 10:06 PM, Dan Anderson wrote:

I just figured out Perl's object / modules system. And after racking my
brain for hours trying to figure out the how, I was hoping somebody
could explain the why -- why exactly was Perl's object system set up the
way it is?

[snip code examples]


And in some ways it seems like objects are faking it.  I've heard some
talk that Perl 6 was supposed to be very object oriented.  Does this
mean that Perl really is faking objects?  Or is it just a paradigm I've
been unfamiliar with.

Short answer: Yes and yes.


Longer answer: Perl's object system was bolted onto the language late in the game, for sure. You're seeing some of that.

However, Perl's object system is ironically VERY Perl. The tools are there to more or less duplicate most other object oriented staples. You could make protected methods pretty easily, if you wanted. The system is simple, but quite flexible.

If you're interested in learning more about all Perlish object issues, Damian's Object Oriented Perl is quite excellent, in my opinion.

James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to