Geoffrey Young <[EMAIL PROTECTED]> writes:
[...]
> +=item * compress()
> +
> + overlap($table, $flags);
> +
> +Compress the data in C<$table>.
better:
Converts multi-valued keys in C<$table> to single-valued keys.
> +
> +param C<$table>: The table to add the data to.
> +
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
Where's the spurious whitespace coming from?
> +param C<$flags>: How to compress C<$table>.
> +
> +When C<$flags> == C<APR_OVERLAP_TABLES_SET>, each key will be
> +set to the last value seen for that key.
> +
> +When C<$flags> == C<APR_OVERLAP_TABLES_MERGE>, multiple values
> +for the same key are flattened into a comma-separated list.
> +
[...]
> +
> + $base->set(foo => 'one');
> + $base->add(foo => 'two');
> +
> + $add->add(foo => 'three');
> + $add->add(bar => 'beer');
> +
> + my $overlay = $base->overlay($add, $r->pool);
> +
> + my @foo = $overlay->get('foo');
> + my @bar = $overlay->get('bar');
> +
> + ok @foo == 3;
> + ok $bar[0] eq 'beer';
> +
> + $overlay->compress(APR::OVERLAP_TABLES_MERGE);
> +
> + # XXX is insertion order guaranteed on all platforms?
Yes- it's guaranteed...
> + ok $overlay->get('foo') =~ m!(\w+, ){2}\w+!;
ok $overlay->get('foo') eq 'one, two, three';
--
Joe Schaefer
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]