blib/lib/Kubernetes/Comb/CRD.pm

filter: Statementstmt 100% 23 / 23 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 96.8% 31 / 32 CC 2 SCAR 2.6
CC
2
Cov
96%
resource_map
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« blib/lib/Kubernetes/Comb/Client/Sync.pm ↑ Summary examples/lib/Example/Comb/Mailer/Stub.pm »
1 package Kubernetes::Comb::CRD;
2 # ABSTRACT: IO::K8s resource map provider for the Comb custom resource
3 28 our $VERSION = '0.002';
4  
5 28 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 28 with 'IO::K8s::Role::ResourceMap';
7  
8 28 ▶use Module::Runtime qw( use_module );
Subroutine BEGIN: called CC=1 SCAR=0.0
9 28 ▶use Types::Standard qw( Str );
Subroutine BEGIN: called CC=1 SCAR=0.0
10 28 ▶use Kubernetes::Comb::CRD::Comb;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 28 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13  
14 28 has crd_class => (
15 is => 'ro',
16 isa => Str,
17 default => 'Kubernetes::Comb::CRD::Comb'
18 );
19  
20  
21 349 ▶sub resource_map {
Subroutine resource_map: called CC=2 SCAR=7.0
Pod documented
22 349 my ( $self ) = @_;
23 349 my $class = $self->crd_class;
24 349 ▶ use_module($class) unless $class->can('kind');
Branch: 1 branch
BranchTrueFalseTotal
unless $class->can("kind") 0 349 349
25 return {
26 349 $class->kind => '+'.$class,
27 $class->api_version.'/'.$class->kind => '+'.$class
28 };
29 }
30  
31  
32 28 1;
33  
34 __END__
« blib/lib/Kubernetes/Comb/Client/Sync.pm ↑ Summary examples/lib/Example/Comb/Mailer/Stub.pm »