| 1 | package Run::Parts::Common; | ||||||||||
| 2 | |||||||||||
| 3 | # ABSTRACT: Common helpers for Run::Parts and its backends | ||||||||||
| 4 | |||||||||||
| 5 | 5 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 5 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 5 | ▶ | use 5.010; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 5 | ▶ | use Exporter::Easy ( EXPORT => [qw[lines chomped_lines]] ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 5 | ▶ | use Scalar::Util qw(blessed); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 5 | our $VERSION = '0.09'; # VERSION generated by DZP::OurPkgVersion | |||||||||
| 13 | |||||||||||
| 14 | |||||||||||
| 15 | 65 | ▶ | sub lines { | ||||||||
|
Subroutine
lines: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 16 | # Sanity check | ||||||||||
| 17 | 65 | ▶ | die "lines is no method" if blessed $_[0]; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | |||||||||||
| 19 | 64 | ▶ | return wantarray ? @_ : join("\n", @_)."\n"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | |||||||||||
| 23 | 27 | ▶ | sub chomped_lines { | ||||||||
|
Subroutine
chomped_lines: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 24 | # Sanity check | ||||||||||
| 25 | 27 | ▶ | die "chomped_lines is no method" if blessed $_[0]; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | |||||||||||
| 27 | 26 | chomp(@_); | |||||||||
| 28 | 26 | return lines(@_); | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | |||||||||||
| 32 | |||||||||||
| 33 | |||||||||||
| 34 | 5 | 23; # End of Run::Parts::Common | |||||||||
| 35 | |||||||||||
| 36 | __END__ | ||||||||||