Stas Bekman <[EMAIL PROTECTED]> writes:
[...]
> Still, once user tries to modify the data, what happens to meta-data?
> When COW is performed, does it copy the whole thing or just whatever
> was pointed by SvCUR?
Doesn't matter. The point is that if there's an Apache::Request::Table
that subclasses APR::Table, it doesn't have to *reimplement everything*
in APR::Table. It can just fixup the return values before they are
returned, like this:
package Apache::Request::Table;
use base 'APR::Table';
sub get {
if (wantarray) {
return map {fixup_sv($_)} &APR::Table::get;
}
else {
return fixup_sv(scalar &APR::Table::get);
}
}
The only XSUB we'd need to maintain in the subclass is fixup_sv().
But if APR::Table uses newSVpvn, Apache::Request::Table would need
to *completely reimplent all* the APR::Table XSUBS.
--
Joe Schaefer
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]