in reply to debug at compile time

Be aware that inheritance is not determined at compile-time. When you do $obj->method(ARGS), what you're actually doing is $obj->can('method')->(ARGS). can() looks something like this:
sub can { my ($self, $meth) = @_; my $class = ref $self || $self; my $subref = *{$class . '::' . $meth}{CODE}; return $subref if defined $subref; for (@{$class . '::ISA'}) { $subref = $_->can($meth); return $subref if defined $subref; } return undef; }
There's a lot of error-handling I've skipped, both in the definition of can() and the "expanded code" ($obj->can('method')->(ARGS)). The point is, you can modify @ISA at any time; there is no compile-time method resolution.