Skip Menu |
 

This queue is for tickets about the CHI CPAN distribution.

Report information
The Basics
Id: 80514
Status: rejected
Priority: 0/
Queue: CHI

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

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



Subject: enabled convert blessed
Date: Tue, 30 Oct 2012 20:22:00 -0500
To: bugs-chi [...] rt.cpan.org
From: Caleb Cushing <xenoterracide [...] gmail.com>
Download (untitled) / with headers
text/plain 475b
encountered object 'TestEntity=HASH(0x2640d68)', but neither allow_blessed nor convert_blessed settings are enabled at /home/libdevel/perl5/perlbrew/perls/perl-5.16.1/lib/site_perl/5.16.1/CHI/Util.pm line 197. I know that I can pass my own serializers for digesting objects, but my objects support the TO_JSON interface required by JSON, so it seems novel just to use that, and then let it fail if that interface isn't provided. -- Caleb Cushing http://xenoterracide.com
Download (untitled) / with headers
text/plain 759b
On Tue Oct 30 21:22:22 2012, XENO wrote: Show quoted text
> encountered object 'TestEntity=HASH(0x2640d68)', but neither > allow_blessed nor convert_blessed settings are enabled at > /home/libdevel/perl5/perlbrew/perls/perl- > 5.16.1/lib/site_perl/5.16.1/CHI/Util.pm > line 197. > > I know that I can pass my own serializers for digesting objects, but > my objects support the TO_JSON interface required by JSON, so it seems > novel just to use that, and then let it fail if that interface isn't > provided. >
I don't want to turn on allow_blessed by default because there's a danger of a silent conversion of a blessed object to "null". Are you saying that CHI itself should check for TO_JSON? It would have to walk complex data structures in case the object was buried.


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.