26 Sep 2014 20:34:02 UTC
- Distribution: Perl-Critic-Policy-CompileTime
- Module version: 0.03
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (163 / 0 / 0)
- KwaliteeBus factor: 0
- % Coverage
- License: perl_5
- Activity24 month
- Download (4.27KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionXAN Alexandra Hrefna Maheuand 1 contributors
- Erin Schoenhals
Perl::Critic::Policy::CompileTime - Provide Perl::Critic support for hunting down compile-time side effects
Perl::Critic::Policy::CompileTime and PPIx::PerlCompiler: A dynamic duo for finding abberant code with bad compile-time side effects!
~$ cat ~/.perlcriticrc include = CompileTime
Perl::Critic::Policy::CompileTime is a Perl::Critic module which allows one to quickly find code in a large codebase or installation which may not run the way one expects when compiled by the Perl compiler, B::C. With the help of the underlying code in PPIx::PerlCompiler, it does so by performing some rudimentary pattern matching against statements and subexpressions in specific instances.
PPIx::PerlCompiler provides the ability to check compile time code blocks, BEGIN, UNITCHECK, and CHECK, for code that may likely have system-wide side effects, or may perform I/O that may invalidate dependent state of compiled binaries when they run.
Perl::Critic::Policy::CompileTime issues severity level 40 advisories regarding the aforementioned features in Perl code. To use this module with Perl::Critic, simply add something like the following to your .perlcriticrc file:
include = CompileTime
Xan Tronix <email@example.com>
Module Install Instructions
To install Perl::Critic::Policy::CompileTime, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Perl::Critic::Policy::CompileTime
For more information on module installation, please visit the detailed CPAN module installation guide.