in reply to Re^5: OO automatic accessor generation
in thread OO automatic accessor generation

Well, I assumed that the OP wants to learn OOP in Perl, not to finish some project on a deadline. And I (still) believe that there are people out there who want to understand the basics of a programing language before trying to "get something done" with it.

Replies are listed 'Best First'.
Re^7: OO automatic accessor generation
by chromatic (Archbishop) on Nov 12, 2009 at 09:15 UTC
    I (still) believe that there are people out there who want to understand the basics of a programing language before trying to "get something done" with it.

    Why stop at blesssing hashes then and not have them write their own method dispatch systems? The blessed-referent, package-is-a-class, method-is-a-sub bare-bones approach of Perl 5 doesn't teach much about OO. It instead teaches a lot about how to smoosh together a few orthogonal concepts into the skeleton of an OO system.

    To whom is that valuable?

      To whom is that valuable?

      To anyone wanting to understand ~99% of the code on CPAN, for example.

        Your argument is "People new to Perl should not use Moose and should create their own object systems because that way they can look in CPAN modules and understand what's happening"? That's silly. If you look in my Mail::TempAddress, your knowledge of blessed hashes won't help much if you don't know anything about SMTP and mail server configuration.

        Assuming that a primary goal of people trying to learn OO Perl really is to understand CPAN modules, what about wanting to understand the 15% of the code on the CPAN that uses Moose?

        (I'm tempted to argue that Moose makes the OO concepts easier to understand by not exposing the Perl 5 mechanism of OO; someone who understands OO can understand Perl 5's mechanism much easier. The other way around is more difficult.)