Skip Menu | will be shut down on March 1st, 2021.

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

Owner: Nobody in particular
Requestors: MAUKE [...]

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

Subject: precedence error (return/or) in Load/LoadFile
Download (untitled) / with headers
text/plain 565b
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.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to