App::MonM::Notifier::Const - Interface for constants
Version 1.00
use App::MonM::Notifier::Const qw/ :levels :bits :functions :reasons :jobs /;
This module provide interface for constants
Returns value of Bit in SET state (1)
Returns value of Bit in UNSET state (0)
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
See CHANGES file
CHANGES
CTK
See TODO file
TODO
* none noted
App::MonM::Notifier
Sergey Lepenkov (Serz Minus) http://www.serzik.com <abalama@cpan.org>
Copyright (C) 1998-2017 D&D Corporation. All Rights Reserved
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
LICENSE
To install App::MonM::Notifier, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::MonM::Notifier
CPAN shell
perl -MCPAN -e shell install App::MonM::Notifier
For more information on module installation, please visit the detailed CPAN module installation guide.