sub can {
# ------------------------------------
# this is the code tilly is talking about below
# sorry , it was late
# ------------------------------------
# my ($calling_package) = caller();
# if ($calling_package eq __PACKAGE__)
# ------------------------------------
# however, this is what I meant ...
my ($self, $method_name) = @_;
# if this is called with by an object specifically
# blessed into this __PACKAGE__, then we
# will handle this because of AUTOLOAD
if (ref($self) eq __PACKAGE__) {
return my_special_can_that_plays_nice_with_AUTOLOAD(@_);
}
else {
return $self->SUPER::can($method_name);
}
}