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?
For instance, C++ is (unbelievably) clear:
class foo {
public:
// public functions + (de)constructurs
protected:
// stuff only our children should have access to
private:
// stuff nobody should have access to
}
But with Perl (if I understand correctly) it takes the form of:
# this would be the class declaration -- in a seperate file
package foo;
# declare things using local, our, my and possibly the Exporter
sub constructor {
# bless data into something
}
# use a closure instead of private:
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.
-Dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]