Apache limits the applicable directives in certain situations with
AllowOverride. With Apache 2.2 comes the possibility to enable or
disable single options, for example

AllowOverride AuthConfig Options=ExecCGI,Indexes

Internally, this directive is parsed into 2 bit fields that are represented
by the $override and $override_opts parameters to add_config.
The above example is parsed into an $override with 2 bits set, one for
AuthConfig the other for Options and an $override_opts with
2 bits set for ExecCGI and Indexes.

When applying other directives, for example AuthType or Options the
appropriate bits in $override must be set. For the Options directive
additionally $override_opts bits must be set.

The $override and $override_opts parameters to add_config are
valid while applying $lines.

$override_opts is new in Apache 2.2. The mod_perl implementation for
Apache 2.0 lets you pass the parameter but ignores it.

dir_config() called in a scalar context without the $key argument
returns a HASH reference blessed into the
APR::Table class. This object can be
manipulated via the APR::Table
methods. For available methods see
the APR::Table manpage.

$value = $r->dir_config($key);

If the $key argument is passed in the scalar context only a single
value will be returned. Since the table preserves the insertion order,
if there is more than one value for the same key, the oldest value
assosiated with the desired key is returned. Calling in the scalar
context is also much faster, as it'll stop searching the table as soon
as the first match happens.

@values = $r->dir_config->get($key);

To receive a list of values you must use get() method from the
APR::Table class.

$r->dir_config($key => $val);

If the $key and the $val arguments are used, the set() operation
will happen: all existing values associated with the key $key (and
the key itself) will be deleted and $value will be placed instead.

$r->dir_config($key => undef);

If $val is undef the unset() operation will happen: all existing
values associated with the key $key (and the key itself) will be
deleted.

It's possible to reuse the HTTP framework features outside the
familiar HTTP request cycle. It's possible to write your own full or
partial HTTP implementation without needing a running Apache
server. You will need the Apache2::RequestRec object in order to be
able to reuse the rich functionality supplied via this object.

Note: sharing variables really means it. The variable is not copied.
Only its reference count is incremented. If it is changed after being
put in pnotes that change also affects the stored value. The following
example illustrates the effect:

There has been a lot of discussion advocating for pnotes sharing variables
by value and not reference. Sharing by reference can create 'spooky action
at a distance' effects when the sharing is assumed to share a copy of the
value. Tim Bunce offers the following summary and suggestion for sharing
by value.

If the server is run under the tainting mode (-T) which we hope you
do, by default the returned data is tainted. If an optional
$tainted flag is set to zero, the data will be marked as
non-tainted.

Do not set this flag to zero unless you know what you are doing,
you may create a security hole in your program if you do. For more
information see the perlsec manpage.

If you wonder why this option is available, it is used internally by
the ModPerl::Registry handler
and friends, because the CGI scripts that it reads are considered safe
(you could just as well require() them).