Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the YAML CPAN distribution.

Report information
The Basics
Id: 47446
Status: rejected
Priority: 0/
Queue: YAML

People
Owner: Nobody in particular
Requestors: perl [...] evancarroll.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.68
Fixed in: (no value)



Subject: [TEST ATTACHED] Confusing order-specific error messages
This confused me, the error message was totally erroneous when it occurred in a specific place. Both of these documents should return similar errors.
Subject: confusing_error_messages.t
## ## This test shows order-sensative lexer error messages ## Evan Carroll <me@evancarroll.com> ## use Test::More tests => 3; use YAML; my $error_at_first = << "END"; ## This document has an error in second element --- foo: bar: bar foo:foo,foo END my $error_at_second = << "END"; ## This document has an error in first element --- foo: foo:foo,foo bar: bar END eval { YAML::Load( $error_at_first ); }; my $err1 = join '', grep /CODE/i, split $/, $@; unlike ( $@, qr/Expected separator '---'/, "confusing error token not found" ); eval { YAML::Load( $error_at_second ); }; my $err2 = join '', grep /CODE/i, split $/, $@; unlike ( $@, qr/Expected separator '---'/, "confusing error token not found" ); is( $err1, $err2, "Same error returned for the same typo" );
This issue has been copied to: https://github.com/ingydotnet/yaml-pm/issues/96 please take all future correspondence there. This ticket will remain open but please do not reply here. This ticket will be closed when the github issue is dealt with.