Stas Bekman <[EMAIL PROTECTED]> 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.
True.
Though there is the do() "filter" interface, which allows you have a callback which iterates correctly with multivalued keys, though might be an overkill for big tables.
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
