line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::ANSI::Util; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
4
|
|
|
|
|
|
|
our $DATE = '2021-08-08'; # DATE |
5
|
|
|
|
|
|
|
our $DIST = 'Text-ANSI-Util'; # DIST |
6
|
|
|
|
|
|
|
our $VERSION = '0.233'; # VERSION |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
75868
|
use 5.010001; |
|
1
|
|
|
|
|
11
|
|
9
|
1
|
|
|
1
|
|
5
|
use strict 'subs', 'vars'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
10
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
80
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
require Exporter; |
13
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
14
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
15
|
|
|
|
|
|
|
ta_add_color_resets |
16
|
|
|
|
|
|
|
ta_detect |
17
|
|
|
|
|
|
|
ta_extract_codes |
18
|
|
|
|
|
|
|
ta_highlight |
19
|
|
|
|
|
|
|
ta_highlight_all |
20
|
|
|
|
|
|
|
ta_length |
21
|
|
|
|
|
|
|
ta_length_height |
22
|
|
|
|
|
|
|
ta_pad |
23
|
|
|
|
|
|
|
ta_split_codes |
24
|
|
|
|
|
|
|
ta_split_codes_single |
25
|
|
|
|
|
|
|
ta_strip |
26
|
|
|
|
|
|
|
ta_substr |
27
|
|
|
|
|
|
|
ta_trunc |
28
|
|
|
|
|
|
|
ta_wrap |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
1
|
|
465
|
use Text::ANSI::BaseUtil (); |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
80
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
our $re = $Text::ANSI::BaseUtil::re; |
34
|
|
|
|
|
|
|
*{$_} = \&{"Text::ANSI::BaseUtil::$_"} for @EXPORT_OK; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
# ABSTRACT: Routines for text containing ANSI color codes |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |