Perl-Critic does exactly that. It's an extensible static source code analyzer based on PPI. It enforces about 60 of Damian's Best Practices, plus a few others. The current interfaces are the
perlcritic command-line and
Test-Perl-Critic which runs via test a script. But I could easily see hooking into a source filter that analyzed the code at compile-time.
-Jeff