line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package BorderStyle::Test::CustomChar; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
4
|
|
|
|
|
|
|
our $DATE = '2021-02-06'; # DATE |
5
|
|
|
|
|
|
|
our $DIST = 'BorderStyleBase'; # DIST |
6
|
|
|
|
|
|
|
our $VERSION = '0.009'; # VERSION |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
73848
|
use strict; |
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
31
|
|
9
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
10
|
1
|
|
|
1
|
|
466
|
use parent 'BorderStyleBase'; |
|
1
|
|
|
|
|
310
|
|
|
1
|
|
|
|
|
5
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our %BORDER = ( |
13
|
|
|
|
|
|
|
v => 2, |
14
|
|
|
|
|
|
|
summary => 'A border style that uses a single custom character', |
15
|
|
|
|
|
|
|
args => { |
16
|
|
|
|
|
|
|
character => { |
17
|
|
|
|
|
|
|
schema => 'str*', |
18
|
|
|
|
|
|
|
req => 1, |
19
|
|
|
|
|
|
|
}, |
20
|
|
|
|
|
|
|
}, |
21
|
|
|
|
|
|
|
examples => [ |
22
|
|
|
|
|
|
|
{ |
23
|
|
|
|
|
|
|
summary => "Use x as the border character", |
24
|
|
|
|
|
|
|
args => {character=>"x"}, |
25
|
|
|
|
|
|
|
}, |
26
|
|
|
|
|
|
|
], |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub get_border_char { |
30
|
1
|
|
|
1
|
0
|
7
|
my ($self, $y, $x, $n, $args) = @_; |
31
|
1
|
50
|
|
|
|
5
|
$n = 1 unless defined $n; |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
|
|
8
|
$self->{args}{character} x $n; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
# ABSTRACT: |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |