symbol-table

How does an object access the symbol table for the current package?

How could I access the symbol table for the current package an object was instantiated in? For example, I have something like this: my $object = MyModule->new; # this looks in the current package, to see if there's a function named run_me # I'd like to know how to do this without passing a sub reference $object->do_your_job; If in the...

How do I access a constant in Perl whose name is contained in a variable?

I have a set of constants declared in Perl: use constant C1 => 111; use constant C2 => 222; .. use constant C9 => 999; my $which_constant = "C2"; How do I construct a Perl expression which, based on $which_constant, derives the value of a constant named with the value of this variable - e.g. "222". Please note that I c...

Mangled symbol table in Objective-C when linking static C++ library

I have a class called options written in c++, here is the header info: class Options { public: string filename; string chunkDir; string outFilename; string inFilename; BOOL compress; BOOL extract; BOOL print; BOOL reconstruct; int bits; Options(string inFilename); Options(int argc, char** argv); void unsupported(string s); v...