Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

poe::test::loops(3pm) [debian man page]

POE::Test::Loops(3pm)					User Contributed Perl Documentation				     POE::Test::Loops(3pm)

NAME
POE::Test::Loops - Reusable tests for POE::Loop authors SYNOPSIS
#!/usr/bin/perl -w use strict; use Getopt::Long; use POE::Test::Loops; my ($dir_base, $flag_help, @loop_modules, $flag_verbose); my $result = GetOptions( 'dirbase=s' => $dir_base, 'loop=s' => @loop_modules, 'verbose' => $flag_verbose, 'help' => $flag_help, ); if ( !$result or !$dir_base or $flag_help or !@loop_modules ) { die( "$0 usage: ", " --dirbase DIR (required) base directory for tests ", " --loop MODULE (required) loop modules to test ", " --verbose show some extra output ", " --help you're reading it ", ); } POE::Test::Loops::generate($dir_base, @loop_modules, $flag_verbose); exit 0; DESCRIPTION
POE::Test::Loops contains one function, generate(), which will generate all the loop tests for one or more POE::Loop subclasses. The "SYNOPSIS" example is a version of poe-gen-tests, which is a stand-alone utility to generate the actual tests. poe-gen-tests also documents the POE::Test::Loops system in more detail. FUNCTIONS
generate( $DIRBASE, @LOOPS, $VERBOSE ) Generates the loop tests. DIRBASE is the (relative) directory in which a subdirectory for each of the LOOPS is created. If VERBOSE is set to a TRUE value some progress reporting is printed. POE::Test::Loops::generate( "./t", [ "POE::Loop::Yours" ], 1, ); SEE ALSO
POE::Loop and poe-gen-tests. AUTHOR &; COPYRIGHT See poe-gen-tests. perl v5.14.2 2012-03-11 POE::Test::Loops(3pm)

Check Out this Related Man Page

POE::Component::Client::MPD::Test(3pm)			User Contributed Perl Documentation		    POE::Component::Client::MPD::Test(3pm)

NAME
POE::Component::Client::MPD::Test - automate pococ-mpd testing VERSION
version 1.121670 SYNOPSIS
POE::Component::Client::MPD->spawn( ... ); POE::Component::Client::MPD::Test->new( { tests => [ [ 'event', [ $arg1, $arg2, ... ], $sleep, &check_results ], ... ] } ); POE::Kernel->run; DESCRIPTION
This module implements a POE::Session used to schedule tests according to a plan, calling hooks used to check whether a given test was successful. To use it, you need to first spawn a POE::Component::Client::MPD session - it's this session that will be tested. And don't forget to call POE's mainloop! Once started, it will fire the first event to the MPD session, wait for the return message, call the check callback, and wait a bit... before starting again with the next event in the list. When all events have been sent, the session will shut down itself. ATTRIBUTES
alias The session alias. Defaults to "tester". tests The list (array ref) of tests to run. It is required in the constructor call. Each list item is an array reference with the following sub- items: o event - the event to send to the POE::Component::Client::MPD session o args - event arguments (an array reference) o sleep - number of seconds to wait before calling next events o callback - a sub reference to check the results of current event. The real tests should be done in this sub. It will be called with the message received and the message payload. PUBLIC EVENTS ACCEPTED
next_test( ) Called to schedule the next test. mpd_result( $msg ) Called when mpd talks back, with $msg as a POE::Component::Client::MPD::Message param. AUTHOR
Jerome Quelin COPYRIGHT AND LICENSE
This software is copyright (c) 2007 by Jerome Quelin. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-06-15 POE::Component::Client::MPD::Test(3pm)
Man Page

Featured Tech Videos