That isn't really solvable, as function names can be
generate during run-time, using "eval" for instance,
but also with: $obj -> $method, or because
they are exported to another package (which happens after
such a package was compiled).
Also, functions can be called from other packages.
Not to mention that there are lots of functions that
are never explicitly called, like BEGIN,
AUTOLOAD, DESTROY, FETCH
and import.
You're right, there are many ways to break something like this, but I was just thinking of something for the common case: sub foo appears, but a call to foo(...) doesn't appear in the same package. That's what I was trying to say with "it doesn't have to be bulletproof".
I guess an analogy would be perltidy. It can be thrown off without trying very hard, but in the common cases it can be helpful.
Given that both OO modules and exporting modules are very
common, the case of having sub foo appear in
a package without a call to it is indeed common.
It's also not an unused sub.