Skip Menu |

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

Report information
The Basics
Id: 85045
Status: open
Priority: 0/
Queue: YAML-Tiny

People
Owner: Nobody in particular
Requestors: pilitsyn [...] gmail.com
Cc:
AdminCc:

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



Subject: Error reading the file where the key name is used first character -
Date: Sat, 04 May 2013 15:12:10 +0400
To: bug-YAML-Tiny [...] rt.cpan.org
From: Пилицын Василий <pilitsyn [...] gmail.com>
Hello! Error reading the file where the key name is used first character "-" example: --- one: two: -three: hello Gentoo Linux, Perl v5.12.4 , YAML-Tiny-1.51 -- С Уважением, Пилицын Василий. тел: 8(916)548-6548 icq: 77917196 skype: pilitsynvasiliy
On Sat May 04 07:11:36 2013, pilitsyn@gmail.com wrote: Show quoted text
> Hello! > > Error reading the file where the key name is used first character "-" > > > example: > --- > one: > two: > -three: hello > > > Gentoo Linux, Perl v5.12.4 , YAML-Tiny-1.51 > >
Thanks for the report. I believe it would be more precise to say that you do not get results you expect or desire rather than that you get an error. When I ran the code, I did not get an error. (See attachment.) ########## $ perl 85045-key-start-with-hyphen.pl $VAR1 = undef; $VAR1 = bless( [ { 'one' => { 'two' => { 'three' => 'hello' } } } ], 'YAML::Tiny' ); ##########
Subject: 85045-key-start-with-hyphen.pl
#!/usr/local/bin/perl use strict; use warnings; use 5.010_001; use Data::Dumper;$Data::Dumper::Indent=1; use Carp; use YAML::Tiny; # https://rt.cpan.org/Ticket/Display.html?id=85045 my $bad_str = <<'BAD'; --- one: two: -three: hello BAD my $y; $y = YAML::Tiny->read_string($bad_str); say STDERR Dumper $y; my $good_str = <<'GOOD'; --- one: two: three: hello GOOD $y = YAML::Tiny->read_string($good_str); say STDERR Dumper $y;
Subject: Re: [rt.cpan.org #85045] Error reading the file where the key name is used first character -
Date: Sat, 28 Sep 2013 20:25:18 +0400
To: bug-YAML-Tiny [...] rt.cpan.org
From: Василий Пилицын <pilitsyn [...] gmail.com>
Your code is modified to include the text output with error #!/usr/bin/perl use strict; use warnings; use 5.010_001; use Data::Dumper;$Data::Dumper::Indent=1; use Carp; use YAML::Tiny; # https://rt.cpan.org/Ticket/Display.html?id=85045 my $bad_str = <<'BAD'; --- one: two: -three: hello BAD my $y; $y = YAML::Tiny->read_string($bad_str) || say YAML::Tiny->errstr(); say STDERR Dumper $y; my $good_str = <<'GOOD'; --- one: two: three: hello GOOD $y = YAML::Tiny->read_string($good_str) || say YAML::Tiny->errstr(); say STDERR Dumper $y; I get an error when running this code perl ./85045-key-start-with-hyphen-modify.pl YAML::Tiny found illegal characters in plain scalar: 'three: hello' $VAR1 = 1; $VAR1 = bless( [ { 'one' => { 'two' => { 'three' => 'hello' } } } ], 'YAML::Tiny' ); 2013/9/28 James E Keenan via RT <bug-YAML-Tiny@rt.cpan.org> Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=85045 > > > On Sat May 04 07:11:36 2013, pilitsyn@gmail.com wrote:
> > Hello! > > > > Error reading the file where the key name is used first character "-" > > > > > > example: > > --- > > one: > > two: > > -three: hello > > > > > > Gentoo Linux, Perl v5.12.4 , YAML-Tiny-1.51 > > > >
> > > Thanks for the report. I believe it would be more precise to say that you > do not get results you expect or desire rather than that you get an error. > When I ran the code, I did not get an error. (See attachment.) > > ########## > $ perl 85045-key-start-with-hyphen.pl > $VAR1 = undef; > > $VAR1 = bless( [ > { > 'one' => { > 'two' => { > 'three' => 'hello' > } > } > } > ], 'YAML::Tiny' ); > ########## >
On Sat Sep 28 12:25:32 2013, pilitsyn@gmail.com wrote: Show quoted text
> Your code is modified to include the text output with error > > > #!/usr/bin/perl > use strict; > use warnings; > use 5.010_001; > use Data::Dumper;$Data::Dumper::Indent=1; > use Carp; > use YAML::Tiny; > > # https://rt.cpan.org/Ticket/Display.html?id=85045 > > my $bad_str = <<'BAD'; > --- > one: > two: > -three: hello > BAD > > my $y; > $y = YAML::Tiny->read_string($bad_str) || say YAML::Tiny->errstr(); > say STDERR Dumper $y; > > my $good_str = <<'GOOD'; > --- > one: > two: > three: hello > GOOD > > $y = YAML::Tiny->read_string($good_str) || say YAML::Tiny->errstr(); > say STDERR Dumper $y; > > > I get an error when running this code > perl ./85045-key-start-with-hyphen-modify.pl > YAML::Tiny found illegal characters in plain scalar: 'three: hello' > > $VAR1 = 1; > > $VAR1 = bless( [ > { > 'one' => { > 'two' => { > 'three' => 'hello' > } > } > } > ], 'YAML::Tiny' ); > >
Confirmed. Thanks for the correction.