Prev: FAQ 6.5 I put a regular expression into $/ but it didn't work. What's wrong?
Next: Module to print hash?
From: Jens Thoms Toerring on 9 Jun 2010 18:27 chad <cdalten(a)gmail.com> wrote: > On Jun 6, 3:35 pm, j...(a)toerring.de (Jens Thoms Toerring) wrote: > > Peng Yu <pengyu...(a)gmail.com> wrote: > > > Suppose I new an object. Is there a way to get the class name from the > > > reference to the object? > > > > The ref() function should return the name of the package of the > > object - I guess that's what you mean by "class name". > Is there more than one defintion to "class name"? Well, in Perl I'm more used to the term "package" (and ref() returns the "package name" for blessed objects according to the documentation) than "class" - thus I was not 100% sure what the OP wanted... Regards, Jens -- \ Jens Thoms Toerring ___ jt(a)toerring.de \__________________________ http://toerring.de
First
|
Prev
|
Pages: 1 2 Prev: FAQ 6.5 I put a regular expression into $/ but it didn't work. What's wrong? Next: Module to print hash? |