in reply to has-a in Perl

I'm not sure I fully understand your question. In the example you're giving, Widget is an abstract base class. You shouldn't ever be working within the Widget class.

As for shared code, your code in Widget will look something like:

sub some_method { my $self = shift; # Do stuff with $self. # At this point, $self will be a Widget::CheckBox }

If that doesn't help, please reply to my post with clarification. (Do not change your base post!)