sub joe_method { my $self = ref ($_[0] eq 'SCALAR') ? getSessionHashRef(shift) : shift; # getSessionHashRef exists in base class, or... # MyApacheSessionHelper->getSessionHashRef (shift) ... } #### sub joe_method { my $self = ref (shift eq 'SOAP::Lite') ? getSessionHashRef(shift) : $_; ... }