##
sub add {
# check if the Big Boss is calling us...
if( (caller(1))[3] =~ /^SomeData::/) {
# we feel guilty, so let's hide
return shift->SUPER::add(@_);
}
# ...back to our scheduled job
my($self, $value) = @_;
die "not a number" unless $value =~ /^\d+$/;
$$self += $value;
}
##
##
add($duration)
##
##
add(duration => $duration)
##
##
return $self->SUPER::add(duration=>$duration);