Apache:...tHandler(3)
π NAME π
Apache::TestHandler β like, a couple of response handlers and helpers, ngl. That's the whole vibe. Fr fr.
Oh and hey, real quick before we dive in: this is a User Contributed Perl Documentation page, bestie β the title up top gets squished to Apache:...tHandler(3) which is honestly giving truncation π, but we move.
β¨ SYNOPSIS β¨
okay so here's how you actually use it, copy-paste ready π
package My::Test;
use Apache::TestHandler ();
sub handler {
my ($r) = @_;
my $result = do_my_test;
Apache::TestHandler::ok1 $r, $result;
}
sub handler2 {
my ($r) = @_;
my $result = do_my_test;
Apache::TestHandler::ok $r, $result;
}
two handlers, both iconic, no notes π«Ά
π¦ DESCRIPTION π¦
Apache::TestHandler provides 2 very simple response handler. That's it. Two. Short king energy π.
πΈ FUNCTIONS πΈ
ok $r, $booleanβ this one just literally prints outokornot ok, depending on that optional$booleanparameter you pass in. if$booleanis omitted, "true" is assumed. so yeah, optimistic default, we love that πok1 $r, $booleanβ okay this one's the main character β¨ it implements a simple response-only test. you can use it all on its own to check whether, for a certain URI, the response phase is reached. or you can just call it like a normal function to print out the test result. the client side gets created automatically, as described in <http://perl.apache.org/docs/general/testing/testing.html#Developing_Response_only_Part_of_a_Test> (iykyk).
and yes, $boolean is optional here too β if you omit it, "true" is assumed. same deal π
same_interp_counterβ TODO πsame_interp_fixupβ TODO π (both of these are literally just listed assame_interp_counter/same_interp_fixupin a lil cluster with no docs, so bestie, that's genuinely all we know. no cap.)
π₯ SEE ALSO π₯
- the Apache-Test tutorial, which you should absolutely go read: <http://perl.apache.org/docs/general/testing/testing.html> π
Apache::Testβ the big sibling π§
π AUTHOR π
Doug MacEachern, Geoffrey Young, Stas Bekman, Torsten FΓΆrtsch and others. legends, all of them β
questions can be asked at the test-dev <at> httpd.apache.org list. for more information see: http://httpd.apache.org/test/. π
and that's the page! π this one was shipped as perl v5.42.3, dated 2023-10-21 β go off, vintage queen ππ«
π¦ where this page comes from
- nixos 26.05: mod_perl 2.0.13
- nixpkgs unstable: mod_perl 2.0.13
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms