perl: November 2007 Archives
Had an interesting problem this week with a hostile legacy codebase. There is a "config" module in the codebase that opens a file and creates methods for each of the variables to give you a config object. You can then get your config values by calling the appropriate method. This works fine but in some places in the code base someone has decided to ignore the methods and access the variables directly. Turns out the package stores the variables in a hash called "config" in the object. Accessing the variables directly is therefore possible by doing something along the lines of:
Continue reading Finding out who is trying to access private hashes.
