Test::...emonize(3pm)
π Test::MooseX::Daemonize β the Test::...emonize(3pm) page, but make it cute π
okay so bestie, this is a page from the User Contributed Perl Documentation collection, and it's literally the whole manual for Test::MooseX::Daemonize. It's short, it's sweet, it's giving helpful little test helper, and we're gonna go through <em>every single bit</em> of it together. No skipping. Periodt. π
β¨ NAME β¨
Test::MooseX::Daemonize β a tool to help test MooseX::Daemonize applications. That's it, that's the whole vibe. It's the friend that holds your hand while you test your daemons. π«Ά
πΈ VERSION πΈ
version <code>0.22</code> β that's the one we're on, bestie. π
π¦ SYNOPSIS π¦
Here's the little taste test, copied <em>exactly</em> so you can run it and feel iconic:
use File::Spec::Functions;
use File::Temp qw(tempdir);
my $dir = tempdir( CLEANUP => 1 );
## Try to make sure we are in the test directory
my $file = catfile( $dir, "im_alive" );
my $daemon = FileMaker->new( pidbase => $dir, filename => $file );
daemonize_ok( $daemon, 'child forked okay' );
ok( -e $file, "$file exists" );
Not me reading this and being like "oh we're forking a child and checking a file exists, slay." Yes. That is exactly what's happening. π
π DESCRIPTION π
So, what does this module even do? It hands you some basic <code>Test::Builder</code>-compatible test methods β you know, the kind that slot right into your test suite without drama β for when you're writing tests for your <code>MooseX::Daemonize</code>-based modules. That's the whole point. It's a helper. It's a bestie. It's not trying to be anything else. π§
π EXPORTED FUNCTIONS π
These are the little functions it gives you. Two of them. Both adorable. Both important. π
daemonize_ok ( $daemon, ?$msg )β This one tries to daemonize your$daemon, and it goes ok on success and not ok on failure. The?$msgis the optional message you can hand it, because every test deserves a little caption. πcheck_test_output ( $daemon )β okay so this one is expected to be used with a$daemonthat does the <code>Test::MooseX::Daemonize::Testable</code> role (that role is included in this package, and the original literally says to <em>see the source for more info</em>). What it does: it collects the test output from your daemon and applies it in the parent process by mucking around withTest::Builderstuff β and again, the original says <em>read the source for more info</em>. And then, iconic behaviour honestly: "If we get time we will document this more thoroughly." π We love a candid queen. The docs are vibes-based and the source is the truth. π«Ά
π SEE ALSO π
MooseX::Daemonizeβ the main character this whole module exists to support. π
π SUPPORT π
Need help? Got beef with a bug? The original lays out the whole support situation, so here it is:
- Bugs may be submitted through the RT bug tracker at https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Daemonize, or you can email bug-MooseX-Daemonize@rt.cpan.org.
- There's also a mailing list for users of this distribution at http://lists.perl.org/list/moose.html. π«Ά
- And there's an irc channel for users of this distribution too β it's "#moose" on "irc.perl.org" (irc://irc.perl.org/#moose). Come say hi, iykyk. π¬
π AUTHORS π
The legends who made this happen:
- Stevan Little
<stevan.little@iinteractive.com> - Chris Prather
<chris@prather.org>
Two icons. One tiny testing module. β¨
π COPYRIGHT AND LICENCE π
This software is copyright (c) 2007 by Chris Prather.
And the legal tea, verbatim in meaning: this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. So go forth and remix, bestie. πΈ
okay and finally, the cute lil sign-off: this whole page is from perl v5.30.0, dated 2019-12-22. π That's the tea, that's the page, go write some tests and slay. πβ¨π¦
π¦ where this page comes from
- debian bookworm: libmoosex-daemonize-perl 0.22-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmoosex-daemonize-perl 0.22-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libmoosex-daemonize-perl 0.22-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmoosex-daemonize-perl 0.22-1 Β· 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