File Coverage

blib/lib/BorderStyle/Test/CustomChar.pm
Criterion Covered Total %
statement 12 12 100.0
branch 1 2 50.0
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 17 19 89.4


line stmt bran cond sub pod time code
1             package BorderStyle::Test::CustomChar;
2              
3 1     1   118651 use strict;
  1         141  
  1         43  
4 1     1   6 use warnings;
  1         2  
  1         34  
5 1     1   520 use parent 'BorderStyleBase';
  1         358  
  1         5  
6              
7             our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
8             our $DATE = '2022-01-24'; # DATE
9             our $DIST = 'BorderStyleBase'; # DIST
10             our $VERSION = '0.010'; # VERSION
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 9 my ($self, $y, $x, $n, $args) = @_;
31 1 50       5 $n = 1 unless defined $n;
32              
33 1         11 $self->{args}{character} x $n;
34             }
35              
36             1;
37             # ABSTRACT:
38              
39             __END__