Query: poe::component::client::mpd::test
OS: debian
Section: 3pm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
POE::Component::Client::MPD::Test(3pm) User Contributed Perl Documentation POE::Component::Client::MPD::Test(3pm)NAMEPOE::Component::Client::MPD::Test - automate pococ-mpd testingVERSIONversion 1.121670SYNOPSISPOE::Component::Client::MPD->spawn( ... ); POE::Component::Client::MPD::Test->new( { tests => [ [ 'event', [ $arg1, $arg2, ... ], $sleep, &check_results ], ... ] } ); POE::Kernel->run;DESCRIPTIONThis 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.ATTRIBUTESalias 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 ACCEPTEDnext_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.AUTHORJerome QuelinCOPYRIGHT AND LICENSEThis 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)
Similar Topics in the Unix Linux Community |
---|
mediacontrol 1.0-beta (Default branch) |
mediacontrol 1.0 (Default branch) |
BuildBot 0.7.9 (Default branch) |
ncmpc 0.12~beta1 (Default branch) |
ERDmpd 0.9 (Default branch) |