blib/lib/Yukki/TextUtil.pm

filter: Statementstmt 94.1% 32 / 34 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 91.6% 11 / 12 Podpod 100% 3 / 3 totaltotal 93.8% 46 / 49 CC 1 SCAR 0.8
CC
1
Cov
94%
dump_file
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« blib/lib/Yukki/Web/Request.pm ↑ Summary blib/lib/Yukki/Settings.pm »
1 package Yukki::TextUtil;
2 19 $Yukki::TextUtil::VERSION = '0.991_007'; # TRIAL
3 19 $Yukki::TextUtil::VERSION = '0.991007';
4 19 ▶use v5.24;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 19 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 19 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 19 ▶use Encode ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8 19 ▶use IO::Prompter ();
Subroutine BEGIN: called CC=1 SCAR=0.0
9 19 ▶use Path::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 19 ▶use YAML ();
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 19 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 # ABSTRACT: Utilities to help make everything happy UTF-8
15  
16  
17 19 ▶use Sub::Exporter -setup => {
Subroutine BEGIN: called CC=1 SCAR=0.0
18 exports => [ qw(
19 dump_file
20 load_file
21 prompt
22 ) ],
23 19 };
24  
25  
26 0 ▶sub dump_file {
Subroutine dump_file: not called CC=1 SCAR=6.9
Pod documented
27 0 my ($file, $data) = @_;
28 0 path($file)->spew_utf8(YAML::Dump($data));
29 }
30  
31  
32 17 ▶sub load_file {
Subroutine load_file: called CC=1 SCAR=0.0
Pod documented
33 17 my ($file) = @_;
34 17 YAML::Load(path($file)->slurp_utf8);
35 }
36  
37  
38 23 ▶sub prompt {
Subroutine prompt: called CC=1 SCAR=0.0
Pod documented
39 23 Encode::decode('UTF-8', IO::Prompter::prompt(@_));
40 }
41  
42 19 1;
43  
44 __END__
« blib/lib/Yukki/Web/Request.pm ↑ Summary blib/lib/Yukki/Settings.pm »