NAME
SHARYANTO::Role::TermAttrs - Role for terminal-related attributes
VERSION
version 0.63
DESCRIPTION
This role gives several options to turn on/off terminal-oriented features like whether to use UTF8 characters, whether to use colors, and color depth. Defaults are set from environment variables or by detecting terminal software/capabilities.
ATTRIBUTES
use_utf8 => BOOL (default: from env, or detected from terminal)
The default is retrieved from environment: if UTF8
is set, it is used. Otherwise, the default is on if terminal emulator software supports Unicode and language (LANG/LANGUAGE) setting has /utf-?8/i in it.
use_box_chars => BOOL (default: from env, or detected from OS)
Default is 0 for Windows.
interactive => BOOL (default: from env, or detected from terminal)
use_color => BOOL (default: from env, or detected from terminal)
color_depth => INT (default: from env, or detected from terminal)
term_width => INT (default: from env, or detected from terminal)
term_height => INT (default: from env, or detected from terminal)
METHODS
detect_terminal() => HASH
Call Term::Detect::Software's detect_terminal_cached
.
ENVIRONMENT
UTF8 => BOOL
Can be used to set
use_utf8
.INTERACTIVE => BOOL
Can be used to set
interactive
.COLOR => BOOL
Can be used to set
use_color
.COLOR_DEPTH => INT
Can be used to set
color_depth
.BOX_CHARS => BOOL
Can be used to set
use_box_chars
.COLUMNS => INT
Can be used to set
term_width
.LINES => INT
Can be used to set
term_height
.
AUTHOR
Steven Haryanto <stevenharyanto@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Steven Haryanto.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
FUNCTIONS
None are exported by default, but they are exportable.