develooper Front page | perl.perl5.porters | Postings from April 2008

Re: [perl #53244] perl-5.10.0-33733 assertion with JSON::XS-2.2

Thread Previous | Thread Next
From:
Marc Lehmann
Date:
April 25, 2008 20:04
Subject:
Re: [perl #53244] perl-5.10.0-33733 assertion with JSON::XS-2.2
Message ID:
20080426030448.GA7184@schmorp.de
On Fri, Apr 25, 2008 at 05:20:48PM -0700, Jan Dubois <jand@activestate.com> wrote:
> I don't think a CPAN module should _ever_ check the private flags. They
> are for core Perl usage only.  At least that's how it used to be.  Isn't
> checking SvPOK() before accessing SvCUR() doing the right thing for you?

upgrading to a PV was always doing the right thing for me. The code in
question seems to dot he right thing, too, in all perl releases I have
tried, including 5.10.

I also don't really think that SvPOK must be true to acecss SvCUR of a PV.
Doesn't make much sense to me.

If, of course, this is now required, I will update my modules accordingly,
but this is definitely a new limitation (i.e. you cnanot call SvCUR on a
PV anymore).

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      pcg@goof.com
      -=====/_/_//_/\_,_/ /_/\_\

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About