Apache2-Translation
view release on metacpan or search on metacpan
the current processing state.
$RC Normally, "Apache2::Translation" checks at the end if "$r->filename"
is set. If so, it returns "Apache2::Const::OK" to its caller. If
not, "Apache2::Const::DECLINED" is returned. The first alternative
signals that the *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, "mod_alias" or the
core translation handler see the request.
Setting $RC your action decide what is returned.
$RC is also set by the "PerlHandler" action. Modperl generated
responses are normally not associated with a single file on disk.
$DEBUG
tied to "$r->notes('Apache2::Translation::n::debug')"
If set to 1 or 2 debugging output is sent to the "error_log".
%CTX
lib/Apache2/Translation.pod view on Meta::CPAN
=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>.
lib/Apache2/Translation/DB.pod view on Meta::CPAN
Normally, C<Apache2::Translation> tries to connect to the database at
server startup. Then it inspects the database handle to see if
C<Apache::DBI> or C<Apache::DBI::Cache> are loaded. If so, it will
connect and disconnect for each translation phase / request, thus,
put back the connection to the connection pool.
If neither of them is loaded the DB connection is used as a singleton.
It is connected once at server startup and then held open (and reconnected
if dropped by the database server).
With the optional C<singleton> parameter you can decide to use a
singleton connection even if a connection pool is in effect. If no
connection pool is loaded, then of course setting C<singleton> to false
has no effect.
=back
=head1 SEE ALSO
=over 4
lib/Apache2/Translation/MMapDB.pod view on Meta::CPAN
$transdb->{'note'}->{$key}->{$uri}=
[[pack('N2', $block1, $order1), $note1],
[pack('N2', $block2, $order2), $note2],
...,
[pack('N2', $blockN, $orderN), $noteN]]
It would have been simpler to join notes and actions into one field and avoid
thus having 2 branches. But the performance relevant operation of this module
is fetching block lists without notes. When looking up the database it is
probably faster to decide only once to dive into the C<actn> branch than to
dissemble action and note from the joined field for each block list element.
=head2 Parameters
All parameters can be passed to the constructor method C<new()> as well
as be specified as configuration directives in a
C<< <TranslationProvider MMapDB> >> container in the C<httpd.conf>.
Parameter names are case insensitive.
=head3 filename
lib/Apache2/Translation/_base.pod view on Meta::CPAN
=item B<new( NAME=E<gt>VALUE, ... )>
the constructor. It is called once from the master Apache during its
configuration.
=item B<child_init>
This method is optional. If defined it is called from a
C<PerlChildInitHandler> and can be used to do some initializations.
The C<DB> provider connects here to the database and decides to use
a singleton or not.
=item B<start>
This method is called at start of each uri translation. The DB provider
checks the cache here.
=item B<stop>
is called after each uri translation.
( run in 0.845 second using v1.01-cache-2.11-cpan-de7293f3b23 )