Hmm. I selected a file from my test dir at random:
#! perl -slw use strict; use Devel::Timer; sub firstNprimes { my $n = shift; open my $primes, '<:raw', 'data\primes.all' or die $!; my @primes = split ' ', do{ local $/ = \( $n * 10 ); <$primes> }; close $primes; return \@primes; } BEGIN{ <STDIN>; } my $T = new Devel::Timer; my $ref = firstNprimes( $ARGV[ 0 ] ); $T->mark( $ARGV[ 0 ] ); { local $\; $T->report; } printf 'Check mem'; <STDIN>; __END__ C:\Perl\test\data>..\junk4 Devel::Timer Report -- Total time: 0.3176 secs Interval Time Percent ---------------------------------------------- 02 -> 03 0.3169 99.78% 100,000 -> 1,000,000 01 -> 02 0.0007 0.21% 201 -> 100,000 00 -> 01 0.0000 0.01% INIT -> 201
And and gave it to your demo page. (It'd be nice if the results where prefixd with a MIME/text header so that my browser wouldn't wrap everything.) I got:
Code before strictures are enabled at line 1, column 1. See page 429 o +f PBP. RCS keywords $Id$ not found at line 1, column 1. See page 441 of PBP. RCS keywords $Revision$, $HeadURL$, $Date$ not found at line 1, column + 1. See page 441 of PBP. RCS keywords $Revision$, $Source$, $Date$ not found at line 1, column +1. See page 441 of PBP. No "VERSION" variable found at line 1, column 1. See page 404 of PBP. Code before warnings are enabled at line 1, column 1. See page 431 of +PBP. perltidy had errors!! at line 1, column 1. See page 33 of PBP. Code not contained in explicit package at line 1, column 1. Violates e +ncapsulation. Code not contained in explicit package at line 2, column 33. Violates +encapsulation. Useless interpolation of literal string at line 2, column 38. See page + 51 of PBP. Code not contained in explicit package at line 2, column 51. Violates +encapsulation. Useless interpolation of literal string at line 2, column 60. See page + 51 of PBP. Code not contained in explicit package at line 7, column 1. Violates e +ncapsulation. Mixed-case subroutine name at line 9, column 1. See page 44 of PBP. Code not contained in explicit package at line 9, column 1. Violates e +ncapsulation. Code not contained in explicit package at line 10, column 5. Violates +encapsulation. Code not contained in explicit package at line 11, column 5. Violates +encapsulation. "die" used instead of "croak" at line 11, column 52. See page 283 of P +BP. Magic punctuation variable used at line 11, column 56. See page 79 of +PBP. Code not contained in explicit package at line 12, column 5. Violates +encapsulation. Quotes used with an empty string at line 12, column 24. See page 53 of + PBP. Code not contained in explicit package at line 12, column 33. Violates + encapsulation. Magic punctuation variable used at line 12, column 39. See page 79 of +PBP. Code not contained in explicit package at line 12, column 47. Violates + encapsulation. Code not contained in explicit package at line 12, column 58. Violates + encapsulation. Code not contained in explicit package at line 13, column 5. Violates +encapsulation. Code not contained in explicit package at line 14, column 5. Violates +encapsulation. Code not contained in explicit package at line 17, column 1. Violates +encapsulation. Code not contained in explicit package at line 17, column 8. Violates +encapsulation. Code not contained in explicit package at line 18, column 1. Violates +encapsulation. Code not contained in explicit package at line 20, column 1. Violates +encapsulation. Code not contained in explicit package at line 20, column 25. Violates + encapsulation. Code not contained in explicit package at line 20, column 32. Violates + encapsulation. Code not contained in explicit package at line 21, column 1. Violates +encapsulation. Code not contained in explicit package at line 21, column 11. Violates + encapsulation. Code not contained in explicit package at line 21, column 18. Violates + encapsulation. Code not contained in explicit package at line 23, column 2. Violates +encapsulation. "local" variable not initialized at line 23, column 3. See page 78 of +PBP. Code not contained in explicit package at line 23, column 3. Violates +encapsulation. Magic punctuation variable used at line 23, column 9. See page 79 of P +BP. Code not contained in explicit package at line 23, column 13. Violates + encapsulation. Code not contained in explicit package at line 25, column 1. Violates +encapsulation. Module does not end with "1;" at line 25, column 21. Must end with a r +ecognizable true value. Code not contained in explicit package at line 25, column 21. Violates + encapsulation. Code not contained in explicit package at line 27, column 1. Violates +encapsulation.
Have you ever heard the parable of the Boy That Cried Wolf? There may be one or two useful messages in there somwhere, but they are so drowned by useless and incorrect noise, that I cannot see them. I cannot even make the line numbers tally?
In reply to Re: Module Announcement: Perl-Critic-1.01
by BrowserUk
in thread Module Announcement: Perl-Critic-1.01
by jthalhammer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |