The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::MonM::Notifier::Agent - App::MonM::Notifier agent

VERSION

Version 1.01

SYNOPSIS

    use App::MonM::Notifier::Agent;

    my $agent = new App::MonM::Notifier::Agent(
        configobj => $app->configobj,
        users => [qw/foo bar/],
    );

DESCRIPTION

This module provides agent methods.

new

    my $agent = new App::MonM::Notifier::Agent(
        configobj => $app->configobj,
        users => [qw/foo bar/],
    );
configobj

CTK config object

users

The list of users

config

    my $configobj = $agent->config;

Returns CTK config object

create

    $agent->create(
        to => "test",
        subject => $sbj,
        message => $msg,
    ) or die($agent->error);

Creates message and returns status of operation

error

    my $error = $agent->error;
    my $status = $agent->error( "error text" );

Returns error string if no arguments. Sets error string also sets status to false (if error string is not false) or to true (if error string is false) and returns this status

status

    if ($agent->status) {
        # OK
    } else {
        # ERROR
    }

Returns object's status. 1 - OK, 0 - ERROR

    my $status = $agent->status( 1 );

Sets new status and returns it

store

    my $store = $agent->store;

Returns current store object

trysend

    $agent->trysend() or die($agent->error);

Tries to send all active messages

HISTORY

See Changes file

DEPENDENCIES

CTK, App::MonM

TO DO

See TODO file

BUGS

* none noted

SEE ALSO

CTK

AUTHOR

Serż Minus (Sergey Lepenkov) http://www.serzik.com <abalama@cpan.org>

COPYRIGHT

Copyright (C) 1998-2019 D&D Corporation. All Rights Reserved

LICENSE

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

See LICENSE file and https://dev.perl.org/licenses/