BorderStyle/Test/CustomChar.pm

filter: Statementstmt 84.2% 16 / 19 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 70.3% 19 / 27 CC 2 SCAR 11.0
CC
2
Cov
76%
get_border_char
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« BorderStyleRole/Transform/OuterOnly.pm ↑ Summary BorderStyle.pm »
1 package BorderStyle::Test::CustomChar;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use Role::Tiny::With;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 with 'BorderStyleRole::Spec::Basic';
8  
9 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
10 1 our $DATE = '2023-07-14'; # DATE
11 1 our $DIST = 'BorderStyle'; # DIST
12 1 our $VERSION = '3.0.3'; # VERSION
13  
14 1 our %BORDER = (
15 v => 3,
16 summary => 'A border style that uses a single custom character',
17 args => {
18 character => {
19 schema => 'str*',
20 req => 1,
21 },
22 },
23 examples => [
24 {
25 summary => "Use x as the border character",
26 args => {character=>"x"},
27 },
28 ],
29 );
30  
31 0 ▶sub get_border_char {
Subroutine get_border_char: not called CC=2 SCAR=17.9
Pod undocumented
32 0 my ($self, %args) = @_;
33 0 ▶ my $repeat = $args{repeat} // 1;
Condition0%0/2
$args{"repeat"} // 1
l!l
00
MC/DC0%0/1
$args{"repeat"} // 1
$args{"repeat"}
Truth table0%0/2
A
A= $args{"repeat"}
Aresult
11
00
34  
35 0 $self->{args}{character} x $repeat;
36 }
37  
38 1 1;
39 # ABSTRACT: A border style that uses a single custom character
40  
41 __END__
« BorderStyleRole/Transform/OuterOnly.pm ↑ Summary BorderStyle.pm »