Jump to content

User:AnomieBOT/source/d/Trial.pm/doc

From Wikipedia, the free encyclopedia

NAME

[edit]

d::Trial - AnomieBOT trial utility decorator

SYNOPSIS

[edit]
 use AnomieBOT::API;
 
 $api = new AnomieBOT::API('conf.ini', 1);
 $api->decorators(qw/d::Trial/);

DESCRIPTION

[edit]

d::Trial contains utility functions for use by an AnomieBOT task in trial. When "d::Trial" is used as a decorator on the API object, the following methods are available.

In addition, all d::Talk methods are also available, as this decorator uses them internally.

METHODS PROVIDED

[edit]
$api->check_trial( $until, $brfa )
Checks if the current timestamp is past the $until timestamp. If not, returns false; if so, whines to the bot talk page and returns a scalar ref that should be dereferenced and returned.
$api->trial_complete( $brfa )
Whines to the bot talk page and returns a value that should be returned.
[edit]

Copyright 2008–2013 Anomie

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.