package Net::SMTP::Server::Client2::MySubClass; use strict; use vars qw/@ISA/; use Net::SMTP::Server::Client2; @isa = qw/Net::SMTP::Server::Client2/; my %private_commands = ( HELO => \&my_hello, [...] ); sub new { my ($class, $sock) = @_; my $self = $class->SUPER::new($sock); bless $self, __PACKAGE__; } [...] sub get_message { my ($self, $cmd, @args) = @_; return $self->SUPER::get_message($cmd, @args) unless exists $private_commands{$cmd}; # from here on mimic the super class's method, but with # calls to your private, "overridden" methods. } sub my_hello { # perform some individual stuff. }