Skip Menu |

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

Report information
The Basics
Id: 91289
Status: resolved
Priority: 0/
Queue: JSON-XS

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

Bug Information
Severity: (no value)
Broken in:
  • 2.34
  • 3.0
  • 3.01
Fixed in: (no value)



Subject: Cannot encode some readonly object
Hi, This problem occurred in using JSON::XS with ReadOnly::XS. http://search.cpan.org/~roode/Readonly-XS/ # Steps to reproduce 1. Install ReadOnly::XS. 2. Run https://gist.github.com/6936efc8149559301c81 # Observed Show quoted text
> Modification of a read-only value attempted at test.pl line 25.
# Patch I think that this "sv_bless" is removable. --- a/XS.xs +++ b/XS.xs @@ -761,7 +761,7 @@ encode_rv (enc_t *enc, SV *sv) ENTER; SAVETMPS; PUSHMARK (SP); // we re-bless the reference to get overload and other niceties right - XPUSHs (sv_bless (sv_2mortal (newRV_inc (sv)), stash)); + XPUSHs (sv_2mortal (newRV_inc (sv))); // calling with G_SCALAR ensures that we always get a 1 return value PUTBACK; Thank you.
Subject: Re: [rt.cpan.org #91289] Cannot encode some readonly object
Date: Tue, 10 Dec 2013 19:30:41 +0100
To: Taku Amano via RT <bug-JSON-XS [...] rt.cpan.org>
From: Marc Lehmann <schmorp [...] schmorp.de>
Hi! Please send your bug report it to the official contact/author address for the module in question (or send it to rt.cpan.org@schmorp.de, that's fine as well). What follows is the rationale for this request, you don't have to read it if you don't care. Why is this necessary? rt.cpan.org has many deficiencies which makes it tedious and hard to use, increasing the workload on the people who provide all the perl modules you probably appreciate (and that is really to be avoided - module authors should be able to invest all their time into improving their modules and not fighting with rt.cpan.org's bugs). Still, for some people, rt.cpan.org is useful to have, and some people even like it and really want to use it. That is fine, too. Unfortunately, the designers of rt.cpan.org didn't make their "service" optional - you can neither opt-in nor opt-out of rt.cpan.org as a module author. Just like a spammer, rt.cpan.org forces its "service" (whether wanted or unwanted) on everybody. Just like a spammer, they don't care for the people they actively hurt. Just like a spammer, they don't don't care to fix these issues and make their "service" ethically acceptable. You cannot even configure it to redirect tickets to somewhere else. Unfortunately, ignoring rt.cpan.org is not an option either: for people reporting possible bugs there is no indication that their report will be ignored, and for module authors it means they miss potentially vital bug reports such as yours (and of course it's a great impression if rt.cpan.org has lots of bug reports that are unanswered, making a module look unmaintained when in fact the opposite might be true). I am sorry that this wasted a bit of your time, but please understand that I am just as much a victim as you are - the problem is the unethical stance of the rt.cpan.org providers who force their "service" on everybody. Please redirect your bug report as stated in the beginning of this mail, and please consider petitioning the rt.cpan.org providers to stop their unethical behaviour and allow opt-in, opt-out, or some redirect option. One last issue: many people mail me that this can be "fixed" by including the bugtracker element in my module meta file. This is not true: 1. This field only affects search.cpan.org and maybe similar services. (Many people confuse rt.cpan.org with search.cpan.org for some reason). 2. It doesn't even work (there are still links to rt.cpan.org displayed). 3. Even if search.cpan.org does no longer display the link, it doesn't actually affect rt.cpan.org (and tests have shown that people go to rt.cpan.org regardless) Even *iff* rt.cpan.org would start listening on the bugtracker field, however, it's still wrong. I have a lot of modules, and each time a service like rt.cpan.org comes out, I would have to make dummy releases for all my modules. This not only creates a lot of extra work for me (I take releases very seriously) but also users, who would wonder why there is a new release. Thanks a lot, Marc Lehmann <rt.cpan.org@schmorp.de> Last updated: 2012-04-22