Apache2-Translation

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

            preproc
            proc
            done

        The "State" action is similar to setting the convenience variable
        $STATE. Only in the latter case you must use the state constants,
        e.g. "$STATE=DONE".

    Last
        If you look for a premature exit from the current block list take
        the "Done" action.

        This action finishes the current list of blocks (just like a false
        condition finishes the current block). It is used together with
        "State" to finish the translation handler from a conditional block
        in the *PREPROC* state:

         :PRE:  0 0 Cond: $finish
         :PRE:  0 1 State: 'done'
         :PRE:  0 2 Last

        Another application of "Last" is to return from a "Call" action.

  Convenience Variables and Data Structures
    $URI
        tied to "$r->uri"

    $REAL_URI
        tied to "$r->unparsed_uri"

    $METHOD
        tied to "$r->method"

    $QUERY_STRING
        tied to "$r->args"

    $FILENAME
        tied to "$r->filename"

    $DOCROOT
        tied to "$r->document_root"

    $HOSTNAME
        tied to "$r->hostname"

    $PATH_INFO
        tied to "$r->path_info"

    $REQUEST
        tied to "$r->the_request"

    $HEADERS
        tied to "$r->headers_in"

    $C  tied to "$r->connection"

    $CLIENTIP
        tied to "$r->connection->remote_ip"

    $KEEPALIVE
        tied to "$r->connection->keepalive"

        For more information see Apache2::RequestRec.

    $MATCHED_URI
        tied to "$r->notes('Apache2::Translation::n::uri')"

    $MATCHED_PATH_INFO
        tied to "$r->notes('Apache2::Translation::n::pathinfo')"

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

    $KEY
        the current key.

        Tied to "$r->notes('Apache2::Translation::n::key')"

    $STATE
        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
        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 "$r->notes" or "$r->pnotes" for that.

APACHE CONFIGURATION DIRECTIVES
    After installed and loaded by

      PerlLoadModule Apache2::Translation

    in your "httpd.conf" "Apache2::Translation" is configured with the
    following directives:

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

        The ellipsis represents configuration lines formatted as



( run in 1.005 second using v1.01-cache-2.11-cpan-df04353d9ac )