Test::MooseX::Daemonize(3pm)

Test::MooseX::Daemonize3pm

Tool to help test moosex::daemonize applications

Usage

    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" );

Version

version 0.22

Overview

This module provides some basic Test::Builder-compatible test methods to use when writing tests for your MooseX::Daemonize-based modules.

Exported functions

daemonize_ok ( $daemon, ?$msg )

This will attempt to daemonize your $daemon returning ok on success and not ok on failure.

check_test_output ( $daemon )

This is expected to be used with a $daemon which does the Test::MooseX::Daemonize::Testable role (included in this package -- see the source for more info). It will collect the test output from your daemon and apply it in the parent process by mucking around with Test::Builder stuff, again, read the source for more info. If we get time we will document this more thoroughly.

Support

Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Daemonize> (or [email protected] <mailto:[email protected]>).

There is also a mailing list available for users of this distribution, at <http://lists.perl.org/list/moose.html>.

There is also an irc channel available for users of this distribution, at "#moose" on "irc.perl.org" <irc://irc.perl.org/#moose>.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 4 times.

  1. 6.0
  2. 7
  3. 8
  4. 9–10
  5. 11–13

Authors

•

Stevan Little <[email protected]>

•

Chris Prather <[email protected]>

From libmoosex-daemonize-perl 0.22-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.