Skip Menu |

This queue is for tickets about the Perl-Metrics-Simple CPAN distribution.

Report information
The Basics
Id: 130260
Status: open
Priority: 0/
Queue: Perl-Metrics-Simple

People
Owner: matisse [...] spamcop.net
Requestors: cpan [...] tlinx.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: countperl <lib> -- doesn't work; no documents found
Date: Mon, 05 Aug 2019 12:28:41 -0700
To: bug-Perl-Metrics-Simple [...] rt.cpan.org
From: L A Walsh <cpan [...] tlinx.org>
have a directory 'lib' with a bunch of perl library files. Wanted to get stats: Ishtar:law/bin> countperl lib Did not supply a document! at /home/perl/perl-5.16.3/lib/site/Perl/Metrics/Simple/Analysis/File.pm line 380. Perl::Metrics::Simple::Analysis::File::_prune_non_code_lines(undef) called at /home/perl/perl-5.16.3/lib/site/Perl/Metrics/Simple/Analysis/File.pm line 167 Perl::Metrics::Simple::Analysis::File::_make_pruned_document(Perl::Metrics::Simple::Analysis::File=HASH(0x1658180), undef) called at /home/perl/perl-5.16.3/lib/site/Perl/Metrics/Simple/Analysis/File.pm line 124 Perl::Metrics::Simple::Analysis::File::_init(Perl::Metrics::Simple::Analysis::File=HASH(0x1658180), "path", "lib/Data/Vars-1.18.pm") called at /home/perl/perl-5.16.3/lib/site/Perl/Metrics/Simple/Analysis/File.pm line 88 Perl::Metrics::Simple::Analysis::File::new("Perl::Metrics::Simple::Analysis::File", "path", "lib/Data/Vars-1.18.pm") called at /home/perl/perl-5.16.3/lib/site/Perl/Metrics/Simple.pm line 37 Perl::Metrics::Simple::analyze_files(Perl::Metrics::Simple=HASH(0x607d08), "lib") called at /usr/bin/countperl line 27 ---- Says perldocs are 'pl|pm|t' files. I think it missed a few under lib: Show quoted text
> tree lib |grep -P '\.(pl|pm|t)$'|wc -l
494 pl files:44 pm files: 336 t files: 114
Can you attach a copy of the file: lib/Data/Vars-1.18.pm
Subject: Re: [rt.cpan.org #130260] countperl <lib> -- doesn't work; no documents found
Date: Mon, 05 Aug 2019 13:23:23 -0700
To: bug-Perl-Metrics-Simple [...] rt.cpan.org
From: L A Walsh <cpan [...] tlinx.org>
On 2019/08/05 13:19, Matisse Enzer via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=130260 > > > Can you attach a copy of the file: > > lib/Data/Vars-1.18.pm >
Sure, BTW, it's dated Jul 9 2015 so it's an old version of another file. Show quoted text
> >

Message body is not shown because it is too large.

I ran countperl on a directory containing that file and get no failure (although I do get warnings). What do you get if you run countperl passing just the path to the file itself? here is what I got passing the path to a directory containing the file: Use of uninitialized value $value in concatenation (.) or string at /usr/local/bin/countperl line 138. Use of uninitialized value $value in concatenation (.) or string at /usr/local/bin/countperl line 138. Use of uninitialized value $value in concatenation (.) or string at /usr/local/bin/countperl line 138. Use of uninitialized value $value in concatenation (.) or string at /usr/local/bin/countperl line 138. Use of uninitialized value $value in concatenation (.) or string at /usr/local/bin/countperl line 138. Use of uninitialized value $value in concatenation (.) or string at /usr/local/bin/countperl line 138. Use of uninitialized value $value in concatenation (.) or string at /usr/local/bin/countperl line 138. Use of uninitialized value $value in concatenation (.) or string at /usr/local/bin/countperl line 138. Use of uninitialized value $value in concatenation (.) or string at /usr/local/bin/countperl line 138. Use of uninitialized value $value in concatenation (.) or string at /usr/local/bin/countperl line 138. Perl files found: 1 Counts ------ total code lines: 1 lines of non-sub code: 1 packages found: 0 subs/methods: 0 Subroutine/Method Size ---------------------- min: max: mean: std. deviation: median: McCabe Complexity ----------------- Code not in any subroutine min: 1 max: 1 mean: 1.00 std. deviation: 0.00 median: 1.00 Subroutines/Methods min: max: mean: std. deviation: median: List of subroutines, with most complex at top --------------------------------------------- complexity sub path size 1 {code not in named subroutines} /tmp/lib/Vars-1.18.pm 1
Subject: Re: [rt.cpan.org #130260] countperl <lib> -- doesn't work; no documents found
Date: Mon, 05 Aug 2019 13:34:55 -0700
To: bug-Perl-Metrics-Simple [...] rt.cpan.org
From: L A Walsh <cpan [...] tlinx.org>
On 2019/08/05 13:31, Matisse Enzer via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=130260 > > > Ishtar:law/bin/lib/Data> countperl Vars-1.18.pm > Did not supply a document! at /home/perl/perl-5.16.3/lib/site/Perl/Metrics/Simple/Analysis/File.pm line 380. > Perl::Metrics::Simple::Analysis::File::_prune_non_code_lines(undef) called at /home/perl/perl-5.16.3/lib/site/Perl/Metrics/Simple/Analysis/File.pm line 167 > Perl::Metrics::Simple::Analysis::File::_make_pruned_document(Perl::Metrics::Simple::Analysis::File=HASH(0x61f878), undef) called at /home/perl/perl-5.16.3/lib/site/Perl/Metrics/Simple/Analysis/File.pm line 124 > Perl::Metrics::Simple::Analysis::File::_init(Perl::Metrics::Simple::Analysis::File=HASH(0x61f878), "path", "./Vars-1.18.pm") called at /home/perl/perl-5.16.3/lib/site/Perl/Metrics/Simple/Analysis/File.pm line 88 > Perl::Metrics::Simple::Analysis::File::new("Perl::Metrics::Simple::Analysis::File", "path", "./Vars-1.18.pm") called at /home/perl/perl-5.16.3/lib/site/Perl/Metrics/Simple.pm line 37 > Perl::Metrics::Simple::analyze_files(Perl::Metrics::Simple=HASH(0x607d08), "Vars-1.18.pm") called at /usr/bin/countperl line 27 >
I get the error...weird...
Can you try re-stalling Perl::Metrics::Simple? sup can install Perl::Metrics::Simple perhaps some lower level library is not working?
Oops I mean: sudo cpan install Perl::Metrics::Simple
Subject: Re: [rt.cpan.org #130260] countperl <lib> -- doesn't work; no documents found
Date: Mon, 05 Aug 2019 13:43:34 -0700
To: bug-Perl-Metrics-Simple [...] rt.cpan.org
From: L A Walsh <cpan [...] tlinx.org>
FWIW, against the current version: Ishtar:law/bin/lib/Data> countperl Vars.pm Did not supply a document! at /home/perl/perl-5.16.3/lib/site/Perl/Metrics/Simple/Analysis/File.pm line 380. Perl::Metrics::Simple::Analysis::File::_prune_non_code_lines(undef) called at /home/perl/perl-5.16.3/lib/site/Perl/Metrics/Simple/Analysis/File.pm line 167 Perl::Metrics::Simple::Analysis::File::_make_pruned_document(Perl::Metrics::Simple::Analysis::File=HASH(0x61f878), undef) called at /home/perl/perl-5.16.3/lib/site/Perl/Metrics/Simple/Analysis/File.pm line 124 Perl::Metrics::Simple::Analysis::File::_init(Perl::Metrics::Simple::Analysis::File=HASH(0x61f878), "path", "./Vars.pm") called at /home/perl/perl-5.16.3/lib/site/Perl/Metrics/Simple/Analysis/File.pm line 88 Perl::Metrics::Simple::Analysis::File::new("Perl::Metrics::Simple::Analysis::File", "path", "./Vars.pm") called at /home/perl/perl-5.16.3/lib/site/Perl/Metrics/Simple.pm line 37 Perl::Metrics::Simple::analyze_files(Perl::Metrics::Simple=HASH(0x607d08), "Vars.pm") called at /usr/bin/countperl line 27 Though I tried it on another file, mem.pm, that worked. Trying it on a few files..ok, alot, ~/bin/lib: ... status=0:AIO_ReadTree.pm status=0:ArStat.pm status=0:Cmd.pm .... status=255:FileSystem.pm status=255:Plug_Common.pm status=255:Utils.pm in the top level 'lib' dir, only 3 are giving that error. The rest give stats....
Can you examine the permissions on the files that give errors?
Subject: Re: [rt.cpan.org #130260] countperl <lib> -- doesn't work; no documents found
Date: Mon, 05 Aug 2019 13:54:49 -0700
To: bug-Perl-Metrics-Simple [...] rt.cpan.org
From: L A Walsh <cpan [...] tlinx.org>
On 2019/08/05 13:45, Matisse Enzer via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=130260 > > > Can you examine the permissions on the files that give errors? >
---- Ishtar:law/bin/lib> llg *.pm -rw-r--r-- 1 law lawgroup 5186 May 4 08:20 AIO_ReadTree.pm -rwxr-xr-x 1 law lawgroup 5357 Jan 24 2019 ArStat.pm* -rwxr-xr-x 1 law lawgroup 9294 Nov 4 2017 Cmd.pm* ... -rwxr-xr-x 1 law lawgroup 5581 Jun 6 08:12 FileSystem.pm* -rw-r--r-- 1 law lawgroup 19169 May 20 19:30 Plug_Common.pm -rwxr-xr-x 1 law lawgroup 7159 Aug 4 17:44 Utils.pm* ... Nothing stands out. Plug isn't executable, but the others are all owned by me, w/rx access to all, and rwx to me
The .pm files being executable seems wrong but should not make a difference. What are the permissions on Vars-1.18.pm ? If nothing stands out about the files giving an error I am at a loss. Sorry.
Subject: Re: [rt.cpan.org #130260] countperl <lib> -- doesn't work; no documents found
Date: Mon, 05 Aug 2019 17:31:37 -0700
To: bug-Perl-Metrics-Simple [...] rt.cpan.org
From: L A Walsh <cpan [...] tlinx.org>
On 2019/08/05 13:58, Matisse Enzer via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=130260 > > > The .pm files being executable seems wrong but should not make a difference. > > What are the permissions on Vars-1.18.pm ? > > If nothing stands out about the files giving an error I am at a loss. Sorry. >
I look at it some more later. In the middle of a few other things rt now. I really appreciate your looking at it and responding to quickly. It is likely to be some weirdness on my system -- who knows. It is very odd that it is only a few modules. BTW, several of my .pm files are executable, and many do something useful. If you ever have pulled down my 'P' module (P.pm), when you run it, it performs a short demo+self-test and shows how various types get printed. or a module like my Pathcat.pm (not in cpan) -- it will concatenate paths and echo the result to the console, so I can use it in Bash. Basically instead of creating a separate program for mods to use them, If it makes sense, I'll try to put the program in the library function. It will only come out when executed as a top-level program, whereas just including it -- will only let the module parts load. *cheers*