| 1 | package BorderStyleRole::Transform::BoxChar; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use 5.010001; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use Role::Tiny; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |||||||||
| 8 | 1 | our $DATE = '2023-07-14'; # DATE | |||||||||
| 9 | 1 | our $DIST = 'BorderStyle'; # DIST | |||||||||
| 10 | 1 | our $VERSION = '3.0.3'; # VERSION | |||||||||
| 11 | |||||||||||
| 12 | 0 | ▶ | around get_border_char => sub { | ||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||
| 13 | 0 | my $orig = shift; | |||||||||
| 14 | 0 | my ($self, %args) = @_; | |||||||||
| 15 | |||||||||||
| 16 | 0 | ▶ | my $char = $args{char} or die "Please specify 'char'"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | 0 | my $res = $orig->(@_); | |||||||||
| 18 | 0 | ▶ | return '' unless length $res; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | 0 | "\e(0$res\e(B"; | |||||||||
| 20 | 1 | }; | |||||||||
| 21 | |||||||||||
| 22 | 1 | 1; | |||||||||
| 23 | # ABSTRACT: Emit proper escape code to display box characters | ||||||||||
| 24 | |||||||||||
| 25 | __END__ | ||||||||||