in reply to Trying to re-use code at different levels of an inherited object.
Therefore to do what you are trying you need to actually compile it in the package that you want. So you can still do what you want, but you need to use a string eval to get it to work right.
For an example of the technique, complete with debugging hooks so that errors are reported from something more meaningful than just some eval, take a look at how I implemented AbstractClass. (Look at the end of perlsyn for an explanation of the #line business.)
|
|---|