Skip Menu |

This queue is for tickets about the YAML-Syck CPAN distribution.

Report information
The Basics
Id: 22043
Status: rejected
Priority: 0/
Queue: YAML-Syck

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

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



Subject: Perl-like array syntax not supported
Jusdt in case it hasn't been reported before: % cat /tmp/ttt --- qr: "^NIKIP/Authen-PAM-" test: expect: ["password","password"] % ysh < /tmp/ttt $VAR1 = { 'test' => { 'expect' => [ 'password', 'password' ] }, 'qr' => '^NIKIP/Authen-PAM-' }; % ysh -MYAML::Syck < /tmp/ttt Syck parser (line 4, column 32): syntax error at /usr/local/bin/ysh line 241, <STDIN> line 4.
Hi, According to the spec that syntax is not allowed, as the space after the comma is mandatory (["password", "password"]). This is due to the fact that YAML treats literals. Observe: • [syeeda:/tmp] nothingmuch % cat foo --- apostrophe: foo's bar comma: bar,gorch single_element_list: [ bar,gorch ] • [syeeda:/tmp] nothingmuch % ysh -MYAML::Syck < foo $VAR1 = { 'single_element_list' => [ 'bar,gorch' ], 'comma' => 'bar,gorch', 'apostrophe' => 'foo\'s bar' }; • [syeeda:/tmp] nothingmuch % ysh < foo $VAR1 = { 'single_element_list' => [ 'bar', 'gorch' ], 'comma' => 'bar,gorch', 'apostrophe' => 'foo\'s bar' }; This is actually a bug in YAML.pm, and will be reported to ingy. Cheers, Yuval
oops, sorry... i clicked on open hoping it'd let me change the queue. =P