[Israel.pm] OO in perl question
gaal at forum2.org
Thu Nov 4 02:51:32 PST 2004
On Thu, Nov 04, 2004 at 12:07:44PM +0200, Issac Goldstand wrote:
> >>First of all, you can store "a" in the blessed variable that represents
> >>your class...
> >>If that's not possible, then you can store $Da::a, $Db::a ... $Dk::a. In
> >>class B, the get_a could do:
> >>return eval ("$".ref($_)."::a");
> >What is a blessed variable that represents a class?
> It is, in the language of perldoc -f bless, "the thingy referenced by REF
> that it is now an object in the CLASSNAME package"
> Variable was possibly a bad pick of words, since it could just as easily be
> a coderef, or glob, but it usually tends to be a variable of some sort - a
> scalar or list, if not a hash, so I used it anyway...
"Variable" was fine; but it doesn't _represent_ the class; it
The variable is a handle to an object, not a class. (Of course, you can
use it to call class methods too.)
Gaal Yahas <gaal at forum2.org>
More information about the Perl