Name
Class::Usul::Constants - Definitions of constant values
Synopsis
use Class::Usul::Constants qw( FALSE SEP TRUE );
my $bool = TRUE; my $slash = SEP;
Description
Exports a list of subroutines each of which returns a constants value
Configuration and Environment
Defines the following class attributes;
Assert
Config_Extn
Config_Key
Exception_Class
Log_Levels
These are accessor / mutators for class attributes of the same name. The constants with uppercase names return these values. At compile time they can be used to set values the are then constant at runtime
Subroutines/Methods
ARRAY
String ARRAY
AS_PARA
Returns a hash reference containing the keys and values that causes the auto formatting output subroutine to clear left, fill paragraphs, and append an extra newline
AS_PASSWORD
Returns a list of arguments for get_line which causes it to prompt for a password
ASSERT
Return a code reference which is imported by Class::Usul::Functions into the callers namespace as the assert
function. By default this will be the empty subroutine, sub {}
. Change this by setting the Assert
class attribute
BRK
Separate leader from message with the characters colon space
CODE
String CODE
COMMA
The comma character
CONFIG_EXTN
The default configuration file extension, .json. Change this by setting the Config_Extn
class attribute
DEFAULT_CONFHOME
Default directory for the config file. The function find_apphome
defaults to returning this value if it cannot find a more suitable one. Returns the temporary directory
DEFAULT_ENCODING
String UTF-8
DEFAULT_ENVDIR
An array reference which if passed to catdir is the directory which will contain the applications installation information. Directory defaults to /etc/default
DEFAULT_L10N_DOMAIN
String default
. The name of the default message catalogue
DIGEST_ALGORITHMS
List of algorithms to try as args to Digest
ENCODINGS
List of supported IO encodings
EXCEPTION_CLASS
The name of the class used to throw exceptions. Defaults to Class::Usul::Exception but can be changed by setting the Exception_Class
class attribute
FAILED
Non zero exit code indicating program failure
FALSE
Digit 0
HASH
String HASH
LANG
Default language code, en
LBRACE
The left brace character, {
LOCALIZE
The character sequence that introduces a localisation substitution parameter, [_
LOG_LEVELS
List of methods the log object is expected to support
NO
The letter n
NUL
Empty (zero length) string
OK
Returns good program exit code, zero
PERL_EXTNS
List of possible file suffixes used on Perl scripts
PHASE
The default phase number used to select installation specific config, 2
PREFIX
Array reference representing the default parent path for a normal install. Defaults to /opt
QUIT
The character q
QUOTED_RE
The regular expression to match a quoted string. Lifted from Regexp::Common which now has installation and indexing issues
SEP
Slash /
character
SPC
Space character
TRUE
Digit 1
UMASK
Default file creation mask, 027 octal, that's rw-r-----
UNDEFINED_RV
Digit -1
. Indicates that a method wrapped in a try/catch block failed to return a defined value
UNTAINT_CMDLINE
Regular expression used to untaint command line strings
UNTAINT_IDENTIFIER
Regular expression used to untaint identifier strings
UNTAINT_PATH
Regular expression used to untaint path strings
USUL_CONFIG_KEY
Default configuration hash key, Plugin::Usul
. Change this by setting the Config_Key
class attribute
UUID_PATH
An array reference which if passed to catdir is the path which will return a unique identifier if opened and read
WIDTH
Default terminal screen width in characters
YES
The character y
Diagnostics
None
Dependencies
Incompatibilities
There are no known incompatibilities in this module
Bugs and Limitations
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Author
Peter Flanigan, <pjfl@cpan.org>
License and Copyright
Copyright (c) 2018 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE