Re: Access class symtab by dereferencing an object

2012-03-14 Thread Jenda Krynicky
Date sent: Sat, 03 Mar 2012 14:42:35 -0500 From: Steve Bertrand > I've been writing a program that will perform extra work for diagnostics > upon each method call. > > As of now, I need to write a call to an outside function manually into > each method. To automa

Re: Access class symtab by dereferencing an object

2012-03-03 Thread Uri Guttman
On 03/03/2012 02:42 PM, Steve Bertrand wrote: I've been writing a program that will perform extra work for diagnostics upon each method call. attributes can do that for each sub. there are modules that let you call code before/after each method call. or class techniques that allow that.

Re: Access class symtab by dereferencing an object

2012-03-03 Thread Paul Johnson
On Sat, Mar 03, 2012 at 02:42:35PM -0500, Steve Bertrand wrote: > I've been writing a program that will perform extra work for > diagnostics upon each method call. > > As of now, I need to write a call to an outside function manually > into each method. To automate this so the original methods do

Re: Access class symtab by dereferencing an object

2012-03-03 Thread Steve Bertrand
On 2012-03-03 14:18, Paul Johnson wrote: On Sat, Mar 03, 2012 at 01:51:28PM -0500, Steve Bertrand wrote: Is there a proper way to do this that someone could point out? no strict "refs"; foreach my $entry ( keys %{ ref($dog) . "::" }) But why? If you really need class introspection then OK,

Re: Access class symtab by dereferencing an object

2012-03-03 Thread Uri Guttman
On 03/03/2012 01:51 PM, Steve Bertrand wrote: Hi all, I have a need to examine and manipulate certain aspects of a class symbol table. I can do this: you claim you have this need but given your skill level, i wonder if that is actually a real need. please state the larger problem you are tr

Re: Access class symtab by dereferencing an object

2012-03-03 Thread Paul Johnson
On Sat, Mar 03, 2012 at 01:51:28PM -0500, Steve Bertrand wrote: > Hi all, > > I have a need to examine and manipulate certain aspects of a class > symbol table. I can do this: > > my $dog = Animal->new(); > foreach my $entry ( keys %Animal:: ){ > ... > } > > ...but what I'd like to do is der

Access class symtab by dereferencing an object

2012-03-03 Thread Steve Bertrand
Hi all, I have a need to examine and manipulate certain aspects of a class symbol table. I can do this: my $dog = Animal->new(); foreach my $entry ( keys %Animal:: ){ ... } ...but what I'd like to do is dereference the object itself to get the class, as there will be times I won't know w