Misc fixes needed to get script to run. #3

Merged
merged 1 commit into from Jun 17, 2012

Conversation

Projects
None yet
2 participants
Contributor

ironcamel commented Jun 17, 2012

I tried running the script in the following way:

perl -Ilib ./bin/dist_surveyor /usr/lib/perl5/site_perl

It failed at first. I had to make some modifications to get that to work. I am providing these modifications in this patch in case they may be helpful to you.

@@ -74,7 +74,7 @@ my $major_error_count = 0; # exit status
# but need to make it large enough for worst case distros (eg eBay-API).
# TODO: switching to the ElasticSearch module, with cursor support, will
# probably avoid the need for this. Else we could dynamically adjust.
-my $metacpan_size = 1500;
+my $metacpan_size = 2500;
@ironcamel

ironcamel Jun 17, 2012

Contributor

I had to increase this value to get the script to work. One offending module that exceeded the 1500 number was Plack-Middleware-RequestHeaders

@@ -93,8 +93,8 @@ if (not $opt_uncached) {
# XXX this locking is flawed but good enough for my needs
# http://search.cpan.org/~pmqs/DB_File-1.824/DB_File.pm#HINTS_AND_TIPS
my $fd = $db->fd;
- open(DB_FH, "+<&=$fd") || die "dup $!";
- flock (DB_FH, LOCK_EX) || die "flock: $!";
+ open(my $DB_FH, "+<&=$fd") || die "dup $!";
@ironcamel

ironcamel Jun 17, 2012

Contributor

This supresses a warning about DB_FH only being used once.

@@ -994,7 +994,7 @@ sub perllocal_distro_mod_version {
our $perllocal_distro_mod_version;
if (not $perllocal_distro_mod_version) { # initial setup
warn "Only first perllocal.pod file will be processed: @$perllocalpod\n"
- if @$perllocalpod > 1;
+ if ref $perllocalpod eq 'ARRAY' and @$perllocalpod > 1;
@ironcamel

ironcamel Jun 17, 2012

Contributor

$perllocalpod is not always an arrayref.

timbunce added a commit that referenced this pull request Jun 17, 2012

Merge pull request #3 from ironcamel/pr/misc-fixes
Misc fixes needed to get script to run.

@timbunce timbunce merged commit 1864616 into timbunce:master Jun 17, 2012

Owner

timbunce commented Jun 17, 2012

Applied. Thanks!

Tim.

On Sun, Jun 17, 2012 at 12:59:53AM -0700, Naveed Massjouni wrote:

I tried running the script in the following way:

perl -Ilib ./bin/dist_surveyor /usr/lib/perl5/site_perl

It failed at first. I had to make some modifications to get that to work. I am providing these modifications in this patch in case they may be helpful to you.

You can merge this Pull Request by running:

git pull https://github.com/ironcamel/Dist-Surveyor pr/misc-fixes

Or you can view, comment on it, or merge it online at:

#3

-- Commit Summary --

  • Misc fixes needed to get script to run.

-- File Changes --

M lib/Dist/Surveyor.pm (8)

-- Patch Links --

https://github.com/timbunce/Dist-Surveyor/pull/3.patch
https://github.com/timbunce/Dist-Surveyor/pull/3.diff


Reply to this email directly or view it on GitHub:
#3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment