in reply to odd: __DATA__ sections are not polymorphic
DATA is a package variable. Perl can't know you want to do what you are doing. Actually in most cases other than yours one probably wants the current behaviour.
You can solve your problem using something like *{ref($self).'::DATA'} to get the handle you want. I would instead consider changing the design, however.
Makeshifts last the longest.
|
|---|