Subject: | Crashing bug in find_dups |
Having run
$ find_duplicate_perl --jobs 5
on our code-base at work, I got
Started: Thu Dec 20 18:54:20 2012
0% [= * ]ETA ------Wide character in syswrite at
/opt/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/File/Slurp.pm line 506.
Can't use an undefined value as an ARRAY reference at /opt/perlbrew/perls/perl-
5.14.2/lib/site_perl/5.14.2/Code/CutNPaste.pm line 188.
This is the code snippet:
$fork->run_on_finish(
sub {
my $duplicates = pop @_;
push @{ $self->_duplicates } => @$duplicates;
}
);
I've added
return if ref($duplicates) ne 'ARRAY';
before the push statement and the module appears to work, but this might be indicative of a
more important problem somewhere else.