My only thought i getting code to work as is cut-and-pasted into place, would be to use
Filter or, better yet
Filter::Simple to actually manipulate the source code. This would let you litterally paste things into place. Now, let me say i do
not suggest this. At one point wrote a macro style pre-processor thinking that, like in C, using code put into place as opposed to function calls would give the smallest time advantage. It did not work, the code was slower with the macro style functions, not to mention that editing your own source using a program is terribly un-clean, more so that
goto even. but i would be interested to see if anyone else has had better luck.
i had a memory leak once, and it ruined my favorite shirt.