perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@covalent.net>
Subject Re: And some strangeness with dir_config
Date Sun, 19 May 2002 01:41:48 GMT
On Sat, 18 May 2002, Dave Rolsky wrote:
 
> More follow up.
> 
> When $c is an APR::Table object, this code:
> 
> 	while (my ($k, $v) = each %$c)
> 	{
> 	    warn " $k => $v\n";
> 	}
> 
> prints
> 
>  MasonAllowGlobals => $Schema
> 
> 3 times over, instead of print $Schema, $UserSession, & $AdminSession.

i think 1.x has the same issue with multi-value keys.  the perl tied hash 
interface uses FIRSTKEY/NEXTKEY where we are able to maintain some state, 
but once the key is returned, perl calls FETCH with that key, 
apr_table_get will always return the first value.

better off using $c->do().


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


Mime
View raw message