Skip Menu |

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

Report information
The Basics
Id: 37771
Status: resolved
Worked: 1.5 hours (90 min)
Priority: 0/
Queue: Perl-Metrics-Simple

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

Bug Information
Severity: (no value)
Broken in: 0.1
Fixed in: 0.11



Subject: countperl dying on empty files
$ touch empty.pl $ countperl empty.pl Can't call method "prune" on an undefined value at /Library/Perl/5.8.6/Perl/Metrics/Simple/Analysis/File.pm line 270. While empty files are technically valid, the real problem is that the script dies before printing the report. I have also seen these warnings pass by: Use of uninitialized value in concatenation (.) or string at /usr/local/bin/countperl line 38.
Thanks for the report. I'll add a test case and fix, probably next week.
I have a new release prepared, version 0.11. I hope to publish it with a week. 0.11 Sat Jul 19 10:31:21 PDT 2008 Fixed http://rt.cpan.org/Public/Bug/Display.html?id=37771 countperl dying on empty files Changes to satisfy Perl::Critic Fixed bug in Perl/Metrics/Simple/Analysis/File.pm where lines after __END__ were being counted. Made line counts platform-independent (using $INPUT_RECORD_SEPARATOR) 0.1 Sun Dec 30 13:30:34 PST 2007 No feature changes. Improved test coverage, documentation. Listed core modules as requirements in Build.PL and Makefile.PL
Subject: Re: [rt.cpan.org #37771] countperl dying on empty files
Date: Sat, 19 Jul 2008 20:59:48 -0400
To: bug-Perl-Metrics-Simple [...] rt.cpan.org
From: Mathieu Gagnon <mathieu [...] gagnon.name>
Cool, by the way your code looks really clean; so much more than the 128k lines project that raised this bug ;-) I'm looking forward to see your changes and further test. Matisse Enzer via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=37771 > > > I have a new release prepared, version 0.11. I hope to publish it with a > week. > > 0.11 Sat Jul 19 10:31:21 PDT 2008 > Fixed http://rt.cpan.org/Public/Bug/Display.html?id=37771 > countperl dying on empty files > > Changes to satisfy Perl::Critic > > Fixed bug in Perl/Metrics/Simple/Analysis/File.pm where lines after > __END__ > were being counted. > > Made line counts platform-independent (using $INPUT_RECORD_SEPARATOR) > > > > 0.1 Sun Dec 30 13:30:34 PST 2007 > No feature changes. > Improved test coverage, documentation. > Listed core modules as requirements in Build.PL and Makefile.PL >
-- Mathieu Gagnon Tél.: 514-256-9437. 2649 Bourbonnière #6, Montréal QC H1W 3P5.
On Sat Jul 19 21:01:25 2008, mathieu@gagnon.name wrote: Show quoted text
> Cool, by the way your code looks really clean; so much more than the > 128k lines project that raised this bug ;-) I'm looking forward to see > your changes and further test.
Thank you. The test suite kind of sucks according to my current standards, and i am going to add to the Todo list - the current test suite is too tightly coupled to complex hard-coded data structures, in my opinion, and, it really should have one .t file per class. Still, having good test coverage has made it easier to make fixes - certainly with less worry. I'm working for Apple these days, so I need to officially ask permission to release any open source code - even stuff like this on CPAN. There is a reasonable process for it though and I expect to be able to publish the new release in a few days.
I finally got all the various permissions I needed to release the new version - 0.11. Thanks again for reporting the problem and my apologies for how long it took to release a fix.