Apache:...tHandler(3)

πŸ“¦ version 2.0.13, in nixos 26.05, nixpkgs unstable

πŸ’… 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 out ok or not ok, depending on that optional $boolean parameter you pass in. if $boolean is 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 as same_interp_counter / same_interp_fixup in a lil cluster with no docs, so bestie, that's genuinely all we know. no cap.)

πŸ”₯ SEE ALSO πŸ”₯


πŸ‘‘ 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