Skip Menu |

This queue is for tickets about the JSON-YAJL CPAN distribution.

Report information
The Basics
Id: 72604
Status: open
Priority: 0/
Queue: JSON-YAJL

People
Owner: Nobody in particular
Requestors: lamoz [...] adriver.ru
Cc:
AdminCc:

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



Subject: Weird output when beautiful generation is on
JSON::YAJL v0.10 perl v5.8.8 I can observe confusing output when parameters of JSON::YAJL::Generator's constructor are not constant. The indentation string actually used is not four spaces but random chars. Test case follows: --------- use JSON::YAJL::Generator; my $g; { my @p = ( 1, ' ' ); $g = JSON::YAJL::Generator->new( @p ); } $g->map_open; $g->string( "Boom!" ); print $g->get_buf;
Cannot reproduce. Not with master, not my latest updates, not with perl 5.8.8, 5.14.4 and 5.22.0. use JSON::YAJL::Generator; use Test::More tests => 1; my $g; { my @p = ( 1, ' ' ); $g = JSON::YAJL::Generator->new( @p ); } $g->map_open; $g->string( "ok 1" ); is $g->get_buf, qq({\n "ok 1"); -- Reini Urban
From: lamoz [...] adriver.ru
Dont know how can I help with debugging here. Fresh perl setup with perlbrew: lamoz@lamoz:~/tmp$ ./lala.pl Wide character in print at ./lala.pl line 12. { ���"Boom!"lamoz@lamoz:~/tmp$ perl -v This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi Copyright 1987-2009, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. lamoz@lamoz:~/tmp$ cat lala.pl #!/usr/bin/env perl use JSON::YAJL::Generator; my $g; { my @p = ( 1, ' ' ); $g = JSON::YAJL::Generator->new( @p ); } $g->map_open; $g->string( "Boom!" ); print $g->get_buf; lamoz@lamoz:~/tmp$ cpan cpan shell -- CPAN exploration and modules installation (v2.00) Enter 'h' for help. cpan[1]> m JSON::YAJL Reading '/home/lamoz/.cpan/Metadata' Database was generated on Sat, 17 Oct 2015 21:41:02 GMT Module id = JSON::YAJL CPAN_USERID LBROCARD (Leon Brocard <acme@astray.com>) CPAN_VERSION 0.10 CPAN_FILE L/LB/LBROCARD/JSON-YAJL-0.10.tar.gz UPLOAD_DATE 2011-08-05 MANPAGE JSON::YAJL - An interface to the YAJL JSON parsing and generation library INST_FILE /home/lamoz/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux-thread-multi/JSON/YAJL.pm INST_VERSION 0.10