Apache::Table(3pm)

Apache::Table3pm

Apache::Table - Perl interface to the Apache table structure

    use Apache::Table ();
    my $headers_out = $r->headers_out;
    while(my($key,$val) = each %$headers_out) {
    ...
    }
    my $table = $r->headers_out;
    $table->set(From => '[email protected]');

mod_perl needs to be compiled with at least one of the following options:

 DYNAMIC=1
 PERL_TABLE_API=1
 EVERYTHING=1

This module provides tied interfaces to Apache data structures.
CLASSES The Apache::Table class provides methods for interfacing with the Apache "table" structure. The following Apache class methods, when called in a scalar context with no "key" argument, will return a HASH reference blessed into the Apache::Table class and where HASH is tied to Apache::Table:

 headers_in
 headers_out
 err_headers_out
 notes
 dir_config
 subprocess_env

METHODS Corresponds to the "ap_table_get" function.

    my $value = $table->get($key);
    my $value = $headers_out->{$key};

Corresponds to the "ap_table_set" function.

    $table->set($key, $value);
    $headers_out->{$key} = $value;

Corresponds to the "ap_table_unset" function.

    $table->unset($key);
    delete $headers_out->{$key};

Corresponds to the "ap_table_clear" function.

    $table->clear;
    %$headers_out = ();

Corresponds to the "ap_table_add" function.

    $table->add($key, $value);

Corresponds to the "ap_table_merge" function.

    $table->merge($key, $value);

Doug MacEachern Apache(3), mod_perl(3)

Releases

4 releases since Debian 2.2 (Potato); the text changed 3 times.

  1. 2.2
  2. 3.0
  3. 3.1
  4. 4.0

From libapache-mod-perl 1.29.0.4-4.1+etch1 in Debian 4.0 (Etch). Parsed by carta from the page's mdoc source.