You've just described what jdhedden dubbed "foreign inheritance". Both Class::InsideOut and Object::InsideOut already support this, though in slightly different ways. The former offers it directly; the latter uses a delegation pattern for a more generalized approach. Docs for both give examples. And neither uses tie.
I've written File::Marker to go along with the inside-out tutorial I'm giving next week at Perl Seminar NY. It gives a very simple example of using the inside-out technique to extend IO::File.
Here's a couple threads on the topic as well
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
In reply to Re: RFC: Class::Moebius
by xdg
in thread RFC: Class::Moebius
by rinceWind
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |