| 1 | package String::Indent::Join; | ||
| 2 | |||
| 3 | #use 5.010001; | ||
| 4 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 1 | ▶ | use Exporter; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 1 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |
| 10 | 1 | our $DATE = '2022-03-27'; # DATE | |
| 11 | 1 | our $DIST = 'Bencher-Scenarios-StringFunctions'; # DIST | |
| 12 | 1 | our $VERSION = '0.006'; # VERSION | |
| 13 | |||
| 14 | 1 | our @ISA = qw(Exporter); | |
| 15 | 1 | our @EXPORT_OK = qw( | |
| 16 | indent | ||
| 17 | ); | ||
| 18 | |||
| 19 | 0 | ▶ | sub indent { |
|
Subroutine
indent: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 20 | 0 | my ($indent, $str) = @_; | |
| 21 | |||
| 22 | #$opts //= {}; | ||
| 23 | #my $ibl = $opts->{indent_blank_lines} // 1; | ||
| 24 | #my $fli = $opts->{first_line_indent} // $indent; | ||
| 25 | #my $sli = $opts->{subsequent_lines_indent} // $indent; | ||
| 26 | ##say "D:ibl=<$ibl>, fli=<$fli>, sli=<$sli>"; | ||
| 27 | |||
| 28 | 0 | join("", map {($indent, $_)} split /^/m, $str); | |
| 29 | } | ||
| 30 | |||
| 31 | 1 | 1; | |
| 32 | # ABSTRACT: String indenting routines | ||
| 33 | |||
| 34 | __END__ | ||