I am of the opinion that this sort of determination belongs exactly as it is now: within the auspices of an appropriately-named module (presumably built-in); and not the Perl language itself. After all, a module can be defined to give you any information that you may want, in any way that you might want to have it, and yet in doing so it remains totally “a black box.” You can have it do whatever it needs to do, without muddying up either the Perl language or, much more importantly, your own code.
It is always better to have a module that gives you the answer that you want, rather than merely the means with which to figure-out that answer using your own “smarts.” This technique insulates everyone (except the maintainer of the module in question) from any Redmond brainstorm.