I tried running your script using:
perlcritic --harsh --statistics script.pl
The results were, well, more than I thought that I would get:
1 files.
1 subroutines/methods.
8 statements.
14 lines, consisting of:
2 blank lines.
1 comment lines.
0 data lines.
11 lines of Perl code.
0 lines of POD.
Average McCabe score of subroutines was 1.00.
17 violations.
Violations per file was 17.000.
Violations per statement was 2.125.
Violations per line of code was 1.214.
6 severity 4 violations.
6 severity 2 violations.
5 severity 1 violations.
5 violations of CodeLayout::RequireConsistentNewlines.
1 violations of CodeLayout::RequireTidyCode.
1 violations of Compatibility::PerlMinimumVersionAndWhy.
1 violations of Editor::RequireEmacsFileVariables.
3 violations of InputOutput::RequireCheckedSyscalls.
3 violations of Miscellanea::RequireRcsKeywords.
1 violations of Modules::RequirePerlVersion.
1 violations of Modules::RequireVersionVar.
1 violations of Subroutines::RequireFinalReturn.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|