perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: [Fwd: Re: [rfc] APR::Table & polymorphic values]
Date Fri, 06 Jun 2003 05:16:26 GMT
Stas Bekman <stas@stason.org> writes:

[...]

> what happens if the key is used in a numeric context? won't this
> scheme blow? 

Sure would, if someone's expecting a key to have
a normal numeric value.  I won't try to pursue
the point further, I'm just trying to leave you 
with an idea of how crappy a workaround would look.

> Probably the only safe way to do that is to attach magic :(

Doesn't work (the bottom line is that string assignment doesn't 
copy SvMAGIC, but I won't bore you with the sv_setsv details).

Anyways, I still think it's best to just document the 
brokenness of the TIEHASH API for APR::Tables, since

  1) perl's TIEHASH API is stupendously slow anyways,
  2) it isn't designed to handle multivalued keys.

-- 
Joe Schaefer


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message