Format/Yaml.pm

filter: Statementstmt 100% 23 / 23 Branchbran 50.0% 2 / 4 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 5 / 5 Podpod 100% 2 / 2 totaltotal 94.8% 37 / 39 CC 3 SCAR 5.0
CC
3
Cov
93%
to_yaml
2.1
from_yaml
2.1
BEGIN
1.0
CRAP 1.7
« Format.pm ↑ Summary Format/Json.pm »
1 package Aion::Format::Yaml;
2  
3 1 ▶use common::sense;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use YAML::Syck qw//;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use Exporter qw/import/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 our @EXPORT = our @EXPORT_OK = grep {
8 1 ▶ *{$Aion::Format::Yaml::{$_}}{CODE} && !/^(_|(NaN|import)\z)/n
Condition100%3/3
*{$Aion::Format::Yaml::{$_};}{'CODE'} && !/^(_|(NaN|import)\z)/nu
!ll&&!rl&&r
312
MC/DC100%2/2
*{$Aion::Format::Yaml::{$_};}{'CODE'} && !/^(_|(NaN|import)\z)/nu
*{$Aion::Format::Yaml::{$_};}{'CODE'} !/^(_|(NaN|import)\z)/nu
Truth table100%3/3
A && not(B)
A= *{$Aion::Format::Yaml::{$_};}{'CODE'}B= !/^(_|(NaN|import)\z)/nu
ABresult
0X0
100
111
9 } keys %Aion::Format::Yaml::;
10  
11 #@category yaml
12  
13 # Настраиваем yaml
14 1 $YAML::Syck::Headless = 1;
15 1 $YAML::Syck::SortKeys = 1;
16 1 $YAML::Syck::ImplicitTyping = 1;
17 1 $YAML::Syck::ImplicitUnicode = 1;
18 1 $YAML::Syck::ImplicitBinary = 1;
19 1 $YAML::Syck::UseCode = 1;
20 1 $YAML::Syck::LoadCode = 1;
21 1 $YAML::Syck::DumpCode = 1;
22  
23 # В yaml
24 3 ▶sub to_yaml(;$) {
Subroutine to_yaml: called CC=2 SCAR=7.6
Pod documented
25 3 ▶ YAML::Syck::Dump(@_ == 0? $_: @_)
Branch: 1 branch
BranchTrueFalseTotal
@_ == 0 ? : 0 3 3
26 }
27  
28 # Из yaml
29 9 ▶sub from_yaml(;$) {
Subroutine from_yaml: called CC=2 SCAR=7.6
Pod documented
30 9 ▶ scalar YAML::Syck::Load(@_ == 0? $_: @_)
Branch: 1 branch
BranchTrueFalseTotal
@_ == 0 ? : 0 9 9
31 }
32  
33 1 1;
34  
35 __END__
« Format.pm ↑ Summary Format/Json.pm »