package My::LibXML::Document; # all method calls in this class should be # delegated to the object in 'base' use Class::Delegation send => -ALL, to => 'base'; sub new { my $class = shift; my $self = bless { base => XML::LibXML::Document->new('1.0','UTF8'), listeners => [1,2,3], # or whatever }, $class; return($self); }; sub listeners { my $listeners = shift->{listeners}; return(@$listeners); }; package main; my $o = My::LibXML::Document->new; print $o->encoding, "\n"; # same as doing $o->{base}->encoding; print join(", ", $o->listeners), "\n";