package FunnyEmail; use base Email::Simple; sub new{ my $class = shift; my $text = shift; # assume this gets passed my $self=Email::Simple->new($text); $self->{'JOKE'} = undef; # add my own variable bless $self,$class; return $self; }