You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CPAN::Meta::YAML found a duplicate key 'no_index' in line ''
at /home/jkeenan/perl5/perlbrew/perls/perl-5.26.0/lib/5.26.0/CPAN/Meta/YAML.pm line 514.
CPAN::Meta::YAML found a duplicate key 'file' in line 'lib/QtCore.pm'
at /home/jkeenan/perl5/perlbrew/perls/perl-5.26.0/lib/5.26.0/CPAN/Meta/YAML.pm line 514.
A CPAN search for QtCore enabled me to quickly identify the YAML file in the second warning: http://cpansearch.perl.org/src/VADIML/QtCore-4.004/META.yml. Since this file is from an unauthorized release from 2008, nothing to lose sleep over.
In the first case, however, the file where we have a duplicate of no_index is not recorded. That suggests to me that in these lines from inside _load_hash():
if ( exists$hash->{$key} ) {
warn"CPAN::Meta::YAML found a duplicate key '$key' in line '$lines->[0]'";
}
... it's possible for $lines->[0] to be either empty or all whitespace -- meaning that we can't identify the file which has the duplicate keys. _load_hash() is called at several points within the module, but I suspect the problematic invocation is here:
I don't know whether this is worth fixing -- after all, this was one out of 30,000+ distributions on CPAN and, given that we're parsing YAML rather than JSON, probably an older distribution. But it should be noted in case anyone is doing refactoring in this part of the module.
Thank you very much.
Jim Keenan
The text was updated successfully, but these errors were encountered:
Today I needed to generate a CPAN river file, which I did by following the same procedures as I have done many times, namely, my local branch of https://github.com/dagolden/zzz-index-cpan-meta. The second of the three basic programs you have to run for this objective is https://github.com/dagolden/zzz-index-cpan-meta/blob/master/calculate-upstream-from-meta.pl. In the course of running this program, I got these two warnings:
A CPAN search for
QtCore
enabled me to quickly identify the YAML file in the second warning: http://cpansearch.perl.org/src/VADIML/QtCore-4.004/META.yml. Since this file is from an unauthorized release from 2008, nothing to lose sleep over.In the first case, however, the file where we have a duplicate of
no_index
is not recorded. That suggests to me that in these lines from inside_load_hash()
:... it's possible for
$lines->[0]
to be either empty or all whitespace -- meaning that we can't identify the file which has the duplicate keys._load_hash()
is called at several points within the module, but I suspect the problematic invocation is here:I don't know whether this is worth fixing -- after all, this was one out of 30,000+ distributions on CPAN and, given that we're parsing YAML rather than JSON, probably an older distribution. But it should be noted in case anyone is doing refactoring in this part of the module.
Thank you very much.
Jim Keenan
The text was updated successfully, but these errors were encountered: