in reply to REAL Basic Perl OOP Questions

Anyway, I was perplexed in that sub new didn’t seem to return anything,
Ahh, but all subroutines automatically return the last expression evaluated, and that new evaluates the bless as the last thing, and bless happens to return the blessed object.

So, it's doing the right thing.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^2: REAL Basic Perl OOP Questions
by o2bwise (Scribe) on Jun 21, 2005 at 23:21 UTC
    Thanks, Merlyn.

    In fact, after posting this, I noticed this on p. 79, 2nd par. of Object Oriented Perl by Damien Conway.

    It felt good to understand something before someone told me!

    Tony
        merlyn,

        Nah, I noticed it a couple hours later. But, I just reposted this whole question, thinking this post was gone (and was recently referred here). I just read your reply about a half hour ago, for the first time.

        I guess I need to understand how to find my posts.