Subject: | precedence error (return/or) in Load/LoadFile |
Line 108 in Parse::CPAN::Meta:
# Create an object from a file
sub LoadFile ($) {
require CPAN::Meta::YAML;
return CPAN::Meta::YAML::LoadFile(shift)
or die CPAN::Meta::YAML->errstr;
}
# Parse a document from a string.
sub Load ($) {
require CPAN::Meta::YAML;
return CPAN::Meta::YAML::Load(shift)
or die CPAN::Meta::YAML->errstr;
}
Both subs contain a statement of the form 'return X or die Y'. Due to the low precedence of 'or', this is parsed as '(return X) or (die Y)', which is equivalent to 'return X'.
These should probably use '||' instead.