Perl::Critic: Difference between revisions

Content deleted Content added
Proposing article for deletion per WP:PROD. (TW)
m External link URL updated for Perl::Critic on CPAN
 
(22 intermediate revisions by 17 users not shown)
Line 1:
{{Infobox software
{{dated prod|concern = Non-notable module|month = May|day = 24|year = 2009|time = 22:07|timestamp = 20090524220749}}
| name = Perl::Critic
<!-- Do not use the "dated prod" template directly; the above line is generated by "subst:prod|reason" -->
| logo = <!-- Image name is enough -->
'''Perl::Critic''' is a [[perl]] module and tool designed to help perl programmers ensure that their code complies with commonly held best practices for perl programming. Since it is a [[static code analysis]] tool, it does not actually execute the code that it examines.
| logo alt =
| logo caption =
| screenshot = <!-- Image name is enough -->
| screenshot alt =
| caption =
| collapsible = <!-- Any text here will collapse the screenshot -->
| author =
| developer =
| released = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} -->
| discontinued = <!-- Set to yes if software is discontinued, otherwise omit -->
| ver layout = <!-- simple (default) or stacked -->
| latest release version =
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} -->
| latest preview version =
| latest preview date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} -->
| status =
| programming language =
| operating system =
| platform =
| size =
| language =
| language count = <!-- Number only -->
| language footnote =
| genre = [[Static program analysis|static code analysis]] system for the [[Perl]] [[programming language]]
| license =
| alexa =
| website = http://perlcritic.com
| repo = https://github.com/Perl-Critic/Perl-Critic/
| standard =
| AsOf =
 
}}
== History ==
The Perl::Critic project grew out of a desire to have an automated tool to help enforce the coding standards recommended by the [[Perl Best Practices]] book by [[Damian Conway]]. Historically, analyzing perl code statically had proven to be difficult because the only tool available to parse Perl code was the ''perl'' program itself, which executed the code. The [http://search.cpan.org/dist/PPI/ PPI] tool was developed to parse, analyze and manipulate Perl code without actually executing it. By using this tool, the Perl::Critic module could be developed to find code that did not comply with the coding standards recommended by the book. It was eventually expanded to find violations of many policies not originally found in the book.
 
'''Perl::Critic''' is a [[Static program analysis|static code analysis]] system for the [[Perl]] [[programming language]]. Perl::Critic is available as a source-code distribution on [[CPAN]]. It comes with a commandline tool, '''perlcritic''', which can check Perl [[source code]] files and report on the code quality therein. Perl::Critic has an extensible architecture that allows the programmer to choose from many "policies" which enforce different Perl programming styles and tastes. The default policy is largely based on the recommendations in the book [[Perl Best Practices]] by [[Damian Conway]].
== Resources ==
* [http://search.cpan.org/dist/Perl-Critic/ The Perl::Critic page] at CPAN
* [http://perlcritic.com/ perlcritic.com] will run Perl::Critic over your source code
 
Perl::Critic is based on the [https://metacpan.org/module/PPI PPI] parsing library. For safety, PPI does not execute any code while parsing, unlike the Perl compiler, so it is a close approximation of the real parser rather than an exact representation.
{{software-stub}}
 
Some new alternatives include Perl::Lint and B::Lint.
 
==External links==
*[http://perlcritic.com Homepage]
* [http://search.cpan.org/dist~petdance/Perl-Critic-1.130/ Thelib/Perl/Critic.pm Perl::Critic page] aton CPAN]
*[https://github.com/Perl-Critic/Perl-Critic/ Source code repository]
*[http://news.perlfoundation.org/2014/03/grant-proposal-perllint---yet.html Perl::Lint A fork for performance]
*[https://metacpan.org/pod/Perl::Lint Perl::Lint in MetaCPAN]
*[https://metacpan.org/pod/B::Lint B::Lint is equivalent to an extended version of the -w option of perl]
 
[[Category:Static code analysis]]
[[Category:Perl]]
[[Category:Program analysis]]
[[Category:Static codeprogram analysis]]