The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

VBTK::Actions - Action definitions used by the VBTK::Server daemon

SUPPORTED PLATFORMS

  • Solaris

SYNOPSIS

  $t = new VBTK::Actions (
    Name         => 'emailMe',
    Execute      => 'mailx -s Warning me@nowhere.com',
    LimitToEvery => '10 min',
    SendUrl      => 1
 );

DESCRIPTION

The VBTK::Actions class is used to define actions to be taken by the VBTK::Server daemon. At the moment, it just executes a command line command, but eventually there will be additional abilities, such as sending email directly to an SMTP server, etc.

METHODS

The following methods are supported

$s = new VBTK::Actions (<parm1> => <val1>, <parm2> => <val2>, ...)

The allows parameters are:

Name

A unique string identifying this action. This still will be used in lists of 'StatusChangeActions' passed to a VBTK::Server daemon

Execute

A string to be executed on the command line when the action is triggered. For example:

    Execute => 'mailx -s Warning me@nowhere.com'
LimitToEvery

A time expression used to limit the number of times the action can be triggered within a window of time. The expression will be evaluated by the Date::Manip class, so it can be just about any recognizable time or date expression. For example: '10 min' or '1 day'.

SendUrl

A boolean setting to indicate whether a URL should be passed to STDIN of the command line which will provide a way for the user to jump right to the offending object. You would usually enable this (1) for email notifications, but disable it (0) for pager notifications.

SUB-CLASSES

The following sub-classes were created to provide common defaults in the use of VBTK::Actions objects.

VBTK::Actions::Email

Defaults for sending an email as an action.

VBTK::Actions::Page

Defaults for sending an email to a pager as an action

Others are sure to follow. If you're interested in adding your own sub-class, just copy and modify some of the existing ones. Eventually, I'll get around to documenting this better.

SEE ALSO

VBTK::Server
VBTK::Parser
VBTK::Templates

AUTHOR

Brent Henry, vbtoolkit@yahoo.com

COPYRIGHT

Copyright (C) 1996-2002 Brent Henry

This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation available at: http://www.gnu.org/copyleft/gpl.html

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 306:

You forgot a '=back' before '=head1'