in reply to Re: Using SUPER in dynamically generated subs
in thread Using SUPER in dynamically generated subs

The problem is that I want to dynamically generate a sub that would APPEAR to have been compiled into package X (and so inherit package X's @ISA), even though it was actually generated in package Y.

But my anonymous sub also relied on the state of the variable $alias_for at compile time. And when I tried a string-eval on the sub, it complained that $alias_for would not stay shared, ie you can have your cake or eat it, not both...

Thanks to ikegami for showing me how to have both.