Philippe M . Chiasson wrote:
> On Mon, Sep 24, 2001 at 09:29:10PM -0400, Geoffrey Young wrote:
>
>>>currently we just grab the apr_table_get implementation for
>>>APR::Table::get(). The problem is that if there is more than one value
>>>added for the same key, get() will return one of these values.
>>>
>>in 1.x this is only true in a scalar context (and is documented as such in
>>the Apache::Table docs I believe)
Yup, we have to implement this.
>>>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?
> my @arr = $r->dir_config->{'key'}
>
> should also be avaliable
right, that's the tie interface.
>>is the 1.x syntax. I am actually very fond of this and wouldn't want to see
>>it change in 2.0 without due discourse (were I to get a vote ;)
>>
>
> I agree. I just looked at the 1.x implementation and I'll try to squeeze it in
> APR::Table. Shouldn't be too complicated or too long at all.
cool, thanks gozer!
> +my @arr = $table->get('key') vs my $key = $table->get('key');
> +not implemented
> +
sure, let's first decide how this should work, if any change should
happen. I think I'll commit the complete API doc, so we can polish it
out and then build the code on top.
but, please, if you put something after the sig, at least mention that
you have something attached at the bottom. I understand that it makes it
easier to patch by feeding the whole email as-is to patch(1), but
sometimes I don't scroll after the sig... thanks.
_____________________________________________________________________
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]