Skip Menu |

This queue is for tickets about the Module-Versions-Report CPAN distribution.

Report information
The Basics
Id: 21995
Status: resolved
Priority: 0/
Queue: Module-Versions-Report

People
Owner: RUZ [...] cpan.org
Requestors: RUZ [...] cpan.org
Cc:
AdminCc:

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



Subject: [PATCH] better check for packages limit
Hello, Sean. Our project uses up to 500 "modules/packages" and we're using your module to report versions of the modules. We would like to suggest next patch to count packages instead of records in the symbol tables. -- Best regards, Ruslan.
Subject: MVR_packages_limit.patch
diff -ur Module-Versions-Report-1.02/lib/Module/Versions/Report.pm Module-Versions-Report-1.02-my/lib/Module/Versions/Report.pm --- Module-Versions-Report-1.02/lib/Module/Versions/Report.pm 2003-06-22 11:26:43.000000000 +0400 +++ Module-Versions-Report-1.02-my/lib/Module/Versions/Report.pm 2006-10-10 17:26:47.000000000 +0400 @@ -2,6 +2,7 @@ require 5; package Module::Versions::Report; $VERSION = '1.02'; +$PACKAGES_LIMIT = 1000; =head1 NAME @@ -100,14 +101,15 @@ my $pref; while(@stack) { $this = shift @stack; - die "Too many packages?" if ++$count > 1000; + die "Too many packages?" if $count > $PACKAGES_LIMIT; next if exists $v{$this}; next if $this eq 'main'; # %main:: is %:: #print "Peeking at $this => ${$this . '::VERSION'}\n"; if(defined ${$this . '::VERSION'} ) { - $v{$this} = ${$this . '::VERSION'} + $v{$this} = ${$this . '::VERSION'}; + $count++; } elsif( defined *{$this . '::ISA'} or defined &{$this . '::import'} or ($this ne '' and grep defined *{$_}{'CODE'}, values %{$this . "::"}) @@ -115,6 +117,7 @@ ) { # It's a class/module with no version. $v{$this} = undef; + $count++; } else { # It's probably an unpopulated package. ## $v{$this} = '...';
From: RUZ [...] cpan.org
Is there any chance this patch would be applied? On Tue Oct 10 09:18:48 2006, RUZ wrote: Show quoted text
> Hello, Sean. > > Our project uses up to 500 "modules/packages" and we're using your > module to report versions of the modules. We would like to suggest next > patch to count packages instead of records in the symbol tables.
-- Best regards, Ruslan.
Ok, I've applied it myself and fix available in 1.03. -- Best regards, Ruslan.