HTTP::...corder(3pm)
π HTTP::Server::Simple::Recorder π
okay so bestie, this is a page from the User Contributed Perl Documentation (that's the 3pm section, iykyk) and it is lowkey one of the most useful little mixins ever. it's giving "I want to see everything my server and my clients are saying to each other" energy. let's go. β¨
πΈ NAME πΈ
HTTP::Server::Simple::Recorder β a mixin that records the sockets of your HTTP::Server::Simple server. like a little stenographer for your HTTP. ππ
π¦ SYNOPSIS π¦
package MyServer;
use base qw/HTTP::Server::Simple::Recorder HTTP::Server::Simple::CGI/;
sub recorder_prefix { "path/to/logs/record" } # defaults to /tmp/http-server-simple-recorder
# logs to path/to/logs/record.34244.1.in,
# path/to/logs/record.34244.1.out,
# path/to/logs/record.34244.2.in,
# path/to/logs/record.34244.2.out, etc, if 34244 is the PID of the server
not the use base line doing the absolute most with two parents at once β that's the whole vibe of a mixin and she ate. π
π DESCRIPTION π
This module lets you record all the HTTP communication between a server derived from HTTP::Server::Simple and that server's clients. no cap, all of it.
It's a mixin, which is the important part β it does not itself subclass HTTP::Server::Simple. So you have to subclass from both HTTP::Server::Simple::Recorder and an actual HTTP::Server::Simple subclass, and HTTP::Server::Simple::Recorder has to be listed first. order matters bestie, don't be out here swapping them. π
Every time a client connects to your server, this module opens a pair of files and logs the communication between the file and the server to those files. yes, a pair β one for the in, one for the out. β¨
Each connection gets a serial number starting at 1. The filename used is $self->recorder_prefix, then a period, then the connection serial number, then a period, then either in or out.
recorder_prefix defaults to /tmp/http-server-simple-recorder, but you can absolutely override that in your subclass β for example, you might want to include the process ID. main character customisation, periodt. π
π§ DEPENDENCIES π§
IO::TeeHTTP::Server::Simple
that's it, she keeps her circle small. π«Ά
π BUGS AND LIMITATIONS π
No bugs have been reported. (gorgeous, flawless, no notes.)
Please report any bugs or feature requests to bug-http-server-simple-recorder@rt.cpan.org, or through the web interface at <http://rt.cpan.org>.
π SEE ALSO π
HTTP::Server::SimpleHTTP::Recorder
β AUTHOR β
David Glasser <glasser@bestpractical.com>
π LICENCE AND COPYRIGHT π
Copyright (c) 2005, Best Practical Solutions, LLC. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. β¨
π¨ DISCLAIMER OF WARRANTY π¨
bestie, this next bit is the legal part and it is serious. read it fr fr. π
because this software is licensed free of charge, there is no warranty for the software, to the extent permitted by applicable law. except when otherwise stated in writing, the copyright holders and/or other parties provide the software "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. the entire risk as to the quality and performance of the software is with you. should the software prove defective, you assume the cost of all necessary servicing, repair, or correction.
in no event, unless required by applicable law or agreed to in writing, will any copyright holder, or any other party who may modify and/or redistribute the software as permitted by the above licence, be liable to you for damages, including any general, special, incidental, or consequential damages arising out of the use or inability to use the software (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the software to operate with any other software), even if such holder or other party has been advised of the possibility of such damages.
and that's the whole page, bestie!! π she's from perl v5.38.2, dated 2024-03-06, and she's literally the HTTP::...corder(3pm) girlie herself. go forth and record those sockets. slay. πβ¨π¦
π¦ where this page comes from
- debian trixie: libhttp-server-simple-recorder-perl 0.03-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libhttp-server-simple-recorder-perl 0.03-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libhttp-server-simple-recorder-perl 0.03-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms