develooper Front page | perl.perl5.porters | Postings from August 2003

Re: Storable Error

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
August 11, 2003 15:01
Subject:
Re: Storable Error
Message ID:
20030811230054.R20130@plum.flirble.org
On Mon, Aug 11, 2003 at 09:58:39PM +0100, Nicholas Clark wrote:

> in hv_store_ent and hv_store_flags
> 
> where it looks like
> 
> > +            if (flags)
> > +                HvHASKFLAGS_on(hv);
> 
> is also needed. However, I can't (yet) work out how to make a test case
> that currently fails.

Stuck. I don't seem to be able to make a test case that triggers a store
of utf8 on "\x{df}" into a hash with non-utf8 "\x{df}" using hv_store

Your example can also be written:

  chop ($a = "\x{df}".chr 256); %a = ("\x{df}", 1); $a{$a} = 1; %a = ();

All hash element assignments seem to go through pp_helem which uses
hv_fetch to do the store. And as you've patched both hv_fetch variants it
all works.

I *think* that anonymous hash creation and whole hash assignment should
go via hv_store, but I'm unable to make an example which triggers it.

Nicholas Clark

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