package My::HTTPRequest ; use base qw/HTTP::Request/ ; sub new{ my ($class) = shift ; my $self = $class->SUPER::new(@_) ; $self->{'myA'} = undef ; return bless $self, $class ; } sub myM{ my ($self) = @_ ; ... } ... 1; #### my $httpr = AnotherModule::f() ; # $httpr is a plain HTTP::Request object my $ownHttpr = transform($httpr) ; # $ownHttpr should be an instance of My::HTTPRequest with all the properties of $httpr .