in reply to Overload and nomethd

You have some strange code reversal here. I would think it'd be a better design to make what you call 'parent' a subclass of 'test', and specify methods to overload to let 'parent' inherit the overloading, or specialize it if need be. For example:

{ package test; use overload '+' => 'op_add'; sub op_add { ... } } { package parent; use test; use base qw(test); }
Instances of 'parent' inherit the overload of '+' here.

Overloading is a pretty delicate and specific thing to just toss into your class based on what your attribute classes are doing. If you insist on going this direction you describe you might be able to accomplish by setting up an accessor for this 'test' attribute of 'parent'. When it's set check to see if the object specified has the overloading you're looking for, then set it up at run-time. You'll probably need a closure to do it properly, and even then it may not work.

That's the most advice I'm willing to give. Falling back on overloading, or setting it up at run-time, are both going to make for some very confusing classes to use. I seriously suggest you rethink your design.