>>>>>Undetermined which. Is this normal? e.g. I was trying to test
>>>>>$r->dir_config->get('key'), and there are a few values for 'key' (added
>>>>>via PerlAddVar),
>>>>>
>>>>>
>>>>my @arr = $r->dir_config->get('key');
>>>>
>>
>>so in the scalar context it brings the first key found and in the list
>>context the whole list. Should we generate a warning if the above is
>>called in the scalar context? Or is it OK, if you know that there is
>>only one key?
>>
>
> Well, the problem is knowing if there is only one entry or more than one.
> The only way to know there is only one instance of the 'key' in the table
> is to iterate over all the elements .. ;-(
>
> I'd rather do it _exactly_ like in 1.x.
You mean always return a list? == always go through all the table :(
may be in the future we will define a new type, which ensures that there
is only one key/val pair, and use a hash for that, to make things faster.
>>>my @arr = $r->dir_config->{'key'}
>>>
>>>should also be avaliable
>>>
>>
>>
>>right, that's the tie interface.
>>
>>
>
> yup.. anybody tried my latest APR::Table tied interface patch ?
it compiles cleanly and passes all the tests :) assuming that the tests
are covering :)
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]