stas 01/10/22 08:47:17 Modified: src/api/mod_perl-2.0/APR Table.pod Log: - tie interface documenation Submitted by: gozer Revision Changes Path 1.2 +19 -3 modperl-docs/src/api/mod_perl-2.0/APR/Table.pod Index: Table.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/api/mod_perl-2.0/APR/Table.pod,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Table.pod 2001/10/02 14:59:17 1.1 +++ Table.pod 2001/10/22 15:47:17 1.2 @@ -21,6 +21,16 @@ $table->merge($key => $val); overlap($table_a, $table_b, $flags); $new_table = overlay($table_base, $table_overlay, $pool); + + #Tied Interface + $value = $table->{$key}; + $table->{$key} = $value; + $table->{$key} = $value; + exists $table->{$key}; + + foreach my $key (keys %{$table}) { + print "$key = $table->{$key}\n"; + } =head1 DESCRIPTION @@ -225,11 +235,17 @@ =head2 TIE Interface -APR::Table sports TIE interface, so you can work with the C<$table> -object as a hash. +C<APR::Table> also implements a tied interface, so you can work with the +C<$table> object as a hash reference. -META: complete +The following tied-hash function are supported: FETCH, STORE, DELETE, +CLEAR, EXISTS, FIRSTKEY, NEXTKEY and DESTROY. +remark: C<APR::Table> can hold more than one key-value pair sharing +the same key, so when using a table through the tied interface, the +first entry found with the right key will be used, completely +disregarding possible other entries with the same key. The only +exception to this is if you iterate over the list with I<each>. =cut
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]