.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "App::CPANTS::Lint 3pm" .TH App::CPANTS::Lint 3pm "2016-05-22" "perl v5.22.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" App::CPANTS::Lint \- front\-end to Module::CPANTS::Analyse .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use App::CPANTS::Lint; \& \& my $app = App::CPANTS::Lint\->new(verbose => 1); \& $app\->lint(\*(Aqpath/to/Foo\-Dist\-1.42.tgz\*(Aq) or print $app\->report; \& \& # if you need raw data \& $app\->lint(\*(Aqpath/to/Foo\-Dist\-1.42.tgz\*(Aq) or return $app\->result; \& \& # if you need to look at the details of analysis \& $app\->lint(\*(Aqpath/to/Foo\-Dist\-1.42.tgz\*(Aq); \& print Data::Dumper::Dumper($app\->stash); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" App::CPANTS::Lint is a core of \f(CW\*(C`cpants_lint.pl\*(C'\fR script to check the Kwalitee of a distribution. See the script for casual usage. You can also use this from other modules for finer control. .SH "METHODS" .IX Header "METHODS" .SS "new" .IX Subsection "new" Takes an optional hash (which will be passed into Module::CPANTS::Analyse internally) and creates a linter object. .PP Available options are: .IP "verbose" 4 .IX Item "verbose" Makes Module::CPANTS::Analyse verbose. False by default. .IP "core_only" 4 .IX Item "core_only" If true, the \f(CW\*(C`lint\*(C'\fR method (see below) returns true even if \f(CW\*(C`extra\*(C'\fR metrics (as well as \f(CW\*(C`experimental\*(C'\fR metrics) fail. This may be useful if you only care Kwalitee rankings. False by default. .IP "experimental" 4 .IX Item "experimental" If true, failed \f(CW\*(C`experimental\*(C'\fR metrics are also reported (via \f(CW\*(C`report\*(C'\fR method). False by default. Note that \f(CW\*(C`experimental\*(C'\fR metrics are not taken into account while calculating a score. .IP "save" 4 .IX Item "save" If true, \f(CW\*(C`output_report\*(C'\fR method writes to a file instead of writing to \s-1STDOUT.\s0 .IP "dump, yaml, json" 4 .IX Item "dump, yaml, json" If true, \f(CW\*(C`report\*(C'\fR method returns a formatted dump of the stash (see below). .IP "search_path" 4 .IX Item "search_path" If you'd like to use extra metrics modules, pass a reference to an array of their parent namespace(s) to search. Metrics modules under Module::CPANTS::Kwalitee namespace are always used. .SS "lint" .IX Subsection "lint" Takes a path to a distribution tarball and analyses it. Returns true if the distribution has no significant issues (experimental metrics are always ignored). Otherwise, returns false. .PP Note that the result doesn't always match with what is shown at the \s-1CPANTS\s0 website, because there are metrics that are only available at the site for various reasons (some of them require database connection, and some are not portable enough). .SS "report" .IX Subsection "report" Returns a report string that contains the details of failed metrics (even if \f(CW\*(C`lint\*(C'\fR method returns true) and a Kwalitee score. .PP If \f(CW\*(C`dump\*(C'\fR (or \f(CW\*(C`yaml\*(C'\fR, \f(CW\*(C`json\*(C'\fR) is set when you create an App::CPANTS::Lint object, \f(CW\*(C`report\*(C'\fR returns a formatted dump of the stash. .SS "result" .IX Subsection "result" Returns a reference to a hash that contains the details of failed metrics and a Kwalitee score. Internal structure may change without notice, but it always has an \*(L"ok\*(R" field (which holds a return value of \f(CW\*(C`lint\*(C'\fR method) at least. .SS "stash" .IX Subsection "stash" Returns a reference to a hash that contains the details of analysis (stored in a stash in Module::CPANTS::Analyse). Internal structure may change without notice, but it always has a \*(L"kwalitee\*(R" field (which holds a reference to a hash that contains the result of each metric) at least. .SS "score" .IX Subsection "score" Returns a Kwalitee score. .SS "output_report" .IX Subsection "output_report" Writes a report to \s-1STDOUT \s0(or to a file). .SS "report_file" .IX Subsection "report_file" Returns a path to a report file, which should have the same distribution name with a version, plus an extension appropriate to the output format. (eg. \f(CW\*(C`Foo\-Bar\-1.42.txt\*(C'\fR, \f(CW\*(C`Foo\-Bar\-1.42.yml\*(C'\fR etc) .SH "SEE ALSO" .IX Header "SEE ALSO" Module::CPANTS::Analyse .PP Test::Kwalitee .SH "AUTHOR" .IX Header "AUTHOR" Kenichi Ishigaki, .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2014 by Kenichi Ishigaki. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.