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             our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
4             our $DATE = '2020-06-19'; # DATE
5             our $DIST = 'BorderStyleBase'; # DIST
6             our $VERSION = '0.004'; # VERSION
7              
8 1     1   122882 use strict;
  1         11  
  1         27  
9 1     1   4 use warnings;
  1         2  
  1         26  
10 1     1   385 use parent 'BorderStyleBase';
  1         273  
  1         4  
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 8 my ($self, $y, $x, $n, $args) = @_;
31 1 50       4 $n = 1 unless defined $n;
32              
33 1         8 $self->{args}{character} x $n;
34             }
35              
36             1;
37             # ABSTRACT:
38              
39             __END__