[Parseperl-discuss] determining object types w/o executing???
Brought to you by:
adamkennedy
From: Mark E. T. <ma...@zz...> - 2005-08-31 17:11:29
|
Howdy All, A very strange conglomeration events has led me here.... I'm very interested in attempting to determine what the type of an object would be at runtime - without actually having to run the program - say to determine available methods from a debugger (as mentioned in the recent article on perl.com). Clearly the code must be run to the point where the object is in the code to then 'ref' it to find out it's type - then something like PPI can be used to walk up the inheiritance tree collecting possible subroutines. Actually executing the program/script everytime just to determine the type of the object is a bummer - as who knows what the side-effects are of running & re-running the code over & over. Have you guys thought about how to tackle this? It does seem the code has to be re-run everytime you would want to know the type of an object. I have a bizarro solution involving attributed-'my' variables to determine object types (replete w/code instrumentation via PPI) BUT re-running the code everytime sucks. Other then detecting whether the code has been modified before having to re-run it again have you guys come up with something to determine varaible types? It can't be possible... right??? thanks! Mark |