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
It seems that libyaml uses the ? ... : ... notation for long hash keys (with "long" being more than 128 characters). I think that this notation brings no readability advantage over the "normal" hash notation (in fact, this notation is quite surprising for most humans), and would vote to do a change here (this would probably be a return 1 in the YAML_SCALAR_EVENT case in yaml_emitter_check_simple_key.
After the change the following test script should pass:
#!/usr/bin/perl
use strict;
use warnings;
use YAML::XS qw(Dump);
use Test::More 'no_plan';
my $bla = '123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEFx';
is Dump({ $bla => 1 }), <<'EOF';
---
123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEFx: 1
EOF
__END__
The text was updated successfully, but these errors were encountered:
This issue should probably be opened in https://github.com/yaml/libyaml instead, as the code you mention is in emitter.c of libyaml, and YAML::XS should usually not modify libyaml sources.
It seems that libyaml uses the
? ... : ...
notation for long hash keys (with "long" being more than 128 characters). I think that this notation brings no readability advantage over the "normal" hash notation (in fact, this notation is quite surprising for most humans), and would vote to do a change here (this would probably be areturn 1
in theYAML_SCALAR_EVENT
case inyaml_emitter_check_simple_key
.After the change the following test script should pass:
The text was updated successfully, but these errors were encountered: