Skip Menu |

This queue is for tickets about the Parse-CPAN-Meta CPAN distribution.

Report information
The Basics
Id: 86947
Status: resolved
Priority: 0/
Queue: Parse-CPAN-Meta

People
Owner: Nobody in particular
Requestors: MAUKE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.4404
Fixed in: (no value)



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.