Skip Menu |

This queue is for tickets about the JSON CPAN distribution.

Report information
The Basics
Id: 21038
Status: resolved
Priority: 0/
Queue: JSON

People
Owner: Nobody in particular
Requestors: mattj [...] trimforspeed.com
Cc:
AdminCc:

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



Subject: QuotApos documentation is flawed
Date: Wed, 16 Aug 2006 22:00:59 -0700
To: bug-JSON [...] rt.cpan.org
From: Matt Johnson <mattj [...] trimforspeed.com>
The example in the documentation section about QuotApos is wrong. It implies that QuotApos can be set at any time. In fact it cannot be. The example should be changed to show QuotApos being set before the new. In my usage I could only get this to work by setting QuotApos before instantiating the JSON module, which is kind of strange in my opinion. Even if that is not changed, the docs should be updated to show something that will work. This was in JSON 1.05 and perl 5.8.5. -- MattJ
On Thu Aug 17 01:01:28 2006, mattj@trimforspeed.com wrote: Show quoted text
> In my usage I could only get this to work by setting QuotApos before > instantiating the JSON module...
That explains why I wasn't having any luck getting it to work. Looking at the code, it makes sense, as $JSON::QuotApos is only used to supply a default in the constructor. A flawed design. These global variables should be deprecated, anyway, and thedocumentation should cover the equivalent parameters to the constructor and other methods. For example, 'quotapos' isn't even documented. The man page asks: Show quoted text
> Which name is more desirable? > SingleQuote and QuotApos...
I vote for SingleQuote. -Tom
Fixed doc by 1.15. Thanks!