in reply to Syntax for preventing repeat object initializations

Hrm. Are you sure, nysus, that this code helps prevent multiple inheritance? As I see it, the __PACKAGE__ key (barring the minor bug) would only prevent the object from being re-initialized in the same package/class, not by other classes. (And that's even assuming all other classes that might bless the object follow this convention!)

Please enlighten me if I am missing something, though! :-)

bbfu
Seasons don't fear The Reaper.
Nor do the wind, the sun, and the rain.
We can be like they are.

Replies are listed 'Best First'.
Re: (bbfu) Re: Syntax for preventing repeat object initializations
by nysus (Parson) on Jul 17, 2001 at 05:32 UTC
    No, I'm not sure. Don't pay much heed to what I write. I'm a total OO newbie and I've been cramming Conway's book down my throat for the past few days. My ability to retain all the info in it is beginning to wane. It's time for me to practice with my own simple code and then come back to the book when my knowledge is more thorough.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop";
    $nysus = $PM . $MCF;
    Click here if you love Perl Monks