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: 29678
Status: open
Priority: 0/
Queue: YAML

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

Bug Information
Severity: Important
Broken in:
  • 0.62
  • 0.63
  • 0.65
  • 0.66
Fixed in: (no value)



Subject: anchors and aliases: dereferencing scalars
Download (untitled) / with headers
text/plain 797b
YAML loses the relation between anchor and alias when converting to perl. YAML::Syck and YAML::XS do it right, preserving a reference. % cat anchor_and_alias_03.yml --- hr: - Mark McGwire # Following node labeled SS - &SS Sammy Sosa rbi: - *SS # Subsequent occurrence - Ken Griffey % ysh -MYAML < anchor_and_alias_03.yml $VAR1 = { 'hr' => [ 'Mark McGwire', 'Sammy Sosa' ], 'rbi' => [ 'Sammy Sosa', 'Ken Griffey' ] }; % ysh -MYAML::XS < anchor_and_alias_03.yml $VAR1 = { 'hr' => [ 'Mark McGwire', 'Sammy Sosa' ], 'rbi' => [ ${\$VAR1->{'hr'}[1]}, 'Ken Griffey' ] }; % ysh -MYAML::Syck < anchor_and_alias_03.yml $VAR1 = { 'hr' => [ 'Mark McGwire', 'Sammy Sosa' ], 'rbi' => [ ${\$VAR1->{'hr'}[1]}, 'Ken Griffey' ] };
Text formatting has once again eaten YAML's leading whitespace. anchor_and_alias_03.yml attached
--- hr: - Mark McGwire # Following node labeled SS - &SS Sammy Sosa rbi: - *SS # Subsequent occurrence - Ken Griffey
Download (untitled) / with headers
text/plain 246b
This issue has been copied to: https://github.com/ingydotnet/yaml-pm/issues/86 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.


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.