NAME
App::MonM::Notifier::Const - Interface for constants
VERSION
Version 1.00
SYNOPSIS
use App::MonM::Notifier::Const qw/ :levels :bits :functions :reasons :jobs /;
DESCRIPTION
This module provide interface for constants
BIT_SET
Returns value of Bit in SET state (1)
BIT_UNSET
Returns value of Bit in UNSET state (0)
FUNCTIONS
getBit
print getBit(123, LVL_DEBUG) ? "SET" : "UNSET"; # UNSET
Getting specified Bit
setBit
printf("%08b", setBit(123, LVL_INFO)); # 01111011
Setting specified Bit. Returns new value.
getLevelName
print getLevelName(1); # info
Returns level name
getLevelByName
print getLevelByName("LVL_INFO") # 1
Returns level value by level name
getPriorityMask
printf("%010b", getPriorityMask(LVL_FATAL)); # 1100000000
Returns default mask. The default mask defines the ability to send messages with a level greater than the specified
setPriorityMask
printf("%010b", setPriorityMask("info error fatal")); # 0100010010
Returns mask by list of levels. All elements of the list should be separated by any non-alphabetic characters
getErr
my $errmsg = getErr(101);
Returns error mask for (s)printf by errorcode
HISTORY
See CHANGES
file
DEPENDENCIES
TO DO
See TODO
file
BUGS
* none noted
SEE ALSO
AUTHOR
Sergey Lepenkov (Serz Minus) http://www.serzik.com <abalama@cpan.org>
COPYRIGHT
Copyright (C) 1998-2017 D&D Corporation. All Rights Reserved
LICENSE
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
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.
See LICENSE
file