Pad/Config/Format.pm

filter: Statementstmt 100% 26 / 26 Branchbran n/a Conditioncond 66.6% 2 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 8 / 8 Podpod 50.0% 1 / 2 totaltotal 90.2% 37 / 41 CC 2 SCAR 2.1
CC
2
Cov
97%
registry
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Pad/Type/Url.pm ↑ Summary Pad/Error.pm »
1 package Getopt::Pad::Config::Format;
2  
3 11 ▶use v5.26;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 11 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 11 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 11 ▶use experimental 'signatures';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 11 ▶use Object::Pad;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 11 ▶use Getopt::Pad::Registry;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 11 our $VERSION = '0.06';
12  
13 11 my @builtins = map { "Getopt::Pad::Config::Format::$_" } qw(Yaml Json);
14 11 my $registry;
15  
16 79 ▶sub registry() {
Subroutine registry: called CC=2 SCAR=7.2
Pod undocumented
17 79 ▶ return $registry //= Getopt::Pad::Registry->new(kind => 'config format')->register(@builtins);
Condition66%2/3
$registry //= "Getopt::Pad::Registry"->new("kind", "config format")->register(@builtins)
l!l&&r!l&&!r
7540
MC/DC0%0/2
$registry //= "Getopt::Pad::Registry"->new("kind", "config format")->register(@builtins)
$registry "Getopt::Pad::Registry"->new("kind", "config format")->register(@builtins)
Truth table66%2/3
A //= B
A= $registryB= "Getopt::Pad::Registry"->new("kind", "config format")->register(@builtins)
ABresult
1X1
011
000
18 }
19  
20 2 ▶sub registerFormat($class) {
Subroutine registerFormat: called CC=1 SCAR=0.0
Pod documented
21 2 return registry()->register($class);
22 }
23  
24 class Getopt::Pad::Config::Format :abstract {
25 11 method parse;
26 }
27  
28 11 1;
29  
30 __END__
« Pad/Type/Url.pm ↑ Summary Pad/Error.pm »