in reply to Re^5: Perl project lines of code "analyzer"
in thread Perl project lines of code "analyzer"

I guess your signature is correct. ;) While adding POD comments support in my code (see the updated work) i noticed that there was a slight oversight in the POD conditionals. Examine for instance this snippet:
use strict; use warnings; # Trap armed my $trap = "Trapped!"; # Does it work? (Yes, it does.) print $trap;
With the oversight i mentioned, your code, erroneously, gives:
Code Cmts POD Total File ============================================================ 3 1 4 8 ./test.pl ============================================================ 3 1 4 8 -- Summary of all files

Replies are listed 'Best First'.
Re^7: Perl project lines of code "analyzer"
by jdhedden (Deacon) on Dec 05, 2005 at 13:12 UTC
    Hmmm... While you're technically correct, I would view anyone who wrote code like that to be... well, psychotic. ;-)

    At any rate, here's the fix. Replace:

    # Count POD if ($line =~ /^=/) { pod++;
    with
    # Count POD if ($line =~ /^=[a-z]/) { $pod++;

    Remember: There's always one more bug.