Why are you opposed to changing the original code? Is this a third party provided file so that your changes will be wiped out by the latest update? If so, that might be a good reason - PROVIDED that you document a hack using PadWalker very carefully with lots of asterisks and capital letters or other PAY ATTENTION TO ME signs in the code that uses. Anything private to a third party module is likely to get renamed, reengineered, restructured, or otherwise disappeared. Despite your goal of not touching third party code, your hack may still break with the next release of the third party code.
If this is internal company code, then you really are better off getting permission to change "my" to "our", even though it is major hassle. The problem with hacks like using PadWalker is that they are virtually impossible for the next programmer to discover who has your job after you. Anyone reading the source code of the file with the "my" variable will reasonably expect that variable not to be vulnerable to being messed with by outside modules. They will be going nuts trying to figure out what in the original module is making it change (nothing of course) they will NEVER think to look elsewhere outside of the file in the many company scripts to find your module playing hack with PadWalker. "my" is like a contract with future maintainers that outsiders won't muck with this.
Of course if the pesky module with "my" is yours and yours alone, then again why NOT change it to "our"?
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.