Apache2-Translation

 view release on metacpan or  search on metacpan

lib/Apache2/Translation.pod  view on Meta::CPAN

tied to C<$r-E<gt>hostname>

=item B<$PATH_INFO>

tied to C<$r-E<gt>path_info>

=item B<$REQUEST>

tied to C<$r-E<gt>the_request>

=item B<$HEADERS>

tied to C<$r-E<gt>headers_in>

=item B<$C>

tied to C<$r-E<gt>connection>

=item B<$CLIENTIP>

tied to C<$r-E<gt>connection-E<gt>remote_ip>

=item B<$KEEPALIVE>

tied to C<$r-E<gt>connection-E<gt>keepalive>

For more information see L<Apache2::RequestRec>.

=item B<$MATCHED_URI>

tied to C<$r-E<gt>notes('Apache2::Translation::n::uri')>

=item B<$MATCHED_PATH_INFO>

tied to C<$r-E<gt>notes('Apache2::Translation::n::pathinfo')>

While in C<PROC> state the incoming uri is split in 2 parts. The first part
is matching the C<uri> field of a database record. The second part is the
rest. They can be accessed as C<$MATCHED_URI> and C<$MATCHED_PATH_INFO>.

=item B<$KEY>

the current key.

Tied to C<$r-E<gt>notes('Apache2::Translation::n::key')>

=item B<$STATE>

the current processing state.

=item B<$RC>

Normally, C<Apache2::Translation> checks at the end if C<$r-E<gt>filename> is
set. If so, it returns C<Apache2::Const::OK> to its caller. If not,
C<Apache2::Const::DECLINED> is returned. The first alternative signals that
the I<Uri Translation Phase> is done and no further handlers are to be called
in this phase. The second alternative says that subsequent handlers are
to be called. Thus, C<mod_alias> or the core translation handler
see the request.

Setting C<$RC> your action decide what is returned.

C<$RC> is also set by the C<PerlHandler> action. Modperl generated responses
are normally not associated with a single file on disk.

=item B<$DEBUG>

tied to C<$r-E<gt>notes('Apache2::Translation::n::debug')>

If set to C<1> or C<2> debugging output is sent to the C<error_log>.

=item B<%CTX>

a hash to store arbitrary data. It can be used to pass data between action
blocks. But note, it is localized to the translation handler. So, it cannot
be used to pass data between different phases of the apache request cycle.
Use C<$r-E<gt>notes> or C<$r-E<gt>pnotes> for that.

=back

=head1 APACHE CONFIGURATION DIRECTIVES

After installed and loaded by

  PerlLoadModule Apache2::Translation

in your C<httpd.conf> C<Apache2::Translation> is configured with
the following directives:

=over 4

=item B<E<lt>TranslationProvider classE<gt> ... E<lt>/TranslationProviderE<gt>>

Currently there are 3 provider classes implemented,
L<Apache2::Translation::DB>, L<Apache2::Translation::File> and
L<Apache2::Translation::BDB>.

The ellipsis represents configuration lines formatted as

 NAME   VALUE

These lines are passed as parameters to the provider. C<NAME> is case
insensitive and is converted to lowercase before passed to the provider
object. Spaces round C<VALUE> are stripped off. If C<VALUE> begins and
ends with the same quotation character (double quote or single quote)
they are also stripped off.

If C<VALUE> is not quoted or is quoted with double quote characters then
it is subject to environment variable expansion. All substrings that match
C<${VAR}> are replaced by the environment variable C<VAR>.

The provider object is then created by:

 $Apache2::Translation::class->new( NAME1=>VALUE1, NAME2=>VALUE2, ... );

where C<class> is exchanged by the actual provider name.

=item B<TranslationProvider class param1 param2 ...>

This is an alternative way to specify translation provider parameters.



( run in 0.591 second using v1.01-cache-2.11-cpan-39bf76dae61 )