| 1 | 15 | package CCfnX::Deployment { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 15 | ▶ | use Moose; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 15 | ▶ | use Module::Runtime qw/use_module/; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 15 | has origin => (is => 'rw', isa => 'CCfn'); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 0 | ▶ | has name => (is => 'rw', isa => 'Str', required => 1, lazy => 1, default => sub { $_[0]->origin->params->name }); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | has type => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | is => 'rw', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | isa => 'Str', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | required => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | clearer => 'clear_type', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 0 | ▶ | default => sub { $_[0]->origin->meta->name } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 15 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 0 | ▶ | has account => (is => 'rw', isa => 'Str', required => 1, lazy => 1, default => sub { (defined $_[0]->origin)?$_[0]->origin->params->account:$ENV{CPSD_AWS_ACCOUNT} }); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=13.0
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 15 | has outputs => (is => 'rw', isa => 'HashRef'); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 0 | ▶ | has params => (is => 'rw', isa => 'HashRef', lazy => 1, default => sub { $_[0]->get_params_from_origin }); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 0 | ▶ | sub get_params_from_origin { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_params_from_origin: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 0 | my $params = $_[0]->origin->params; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 0 | my @attrs = map { $_->name } $params->meta->get_all_attributes; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 0 | my %p = map { $_ => $params->$_ } grep { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 0 | ▶ | $_ ne 'ARGV' | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/9
$_ ne 'ARGV' && $_ ne 'extra_argv' && $_ ne 'help_flag' && $_ ne 'usage'
$_ ne "ARGV" and $_ ne "extra_argv" and $_ ne "help_flag"
$_ ne "ARGV" and $_ ne "extra_argv"
MC/DC0%0/4
$_ ne 'ARGV' && $_ ne 'extra_argv' && $_ ne 'help_flag' && $_ ne 'usage'
$_ ne "ARGV"
$_ ne "extra_argv"
$_ ne "help_flag"
$_ ne 'usage'
Truth table0%0/5
A and B and C && D
A= $_ ne "ARGV"B= $_ ne "extra_argv"C= $_ ne "help_flag"D= $_ ne 'usage'
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | and $_ ne 'extra_argv' | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | and $_ ne 'help_flag' | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | and $_ ne 'usage' | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | } @attrs; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 0 | return \%p; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | 0 | ▶ | sub output { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
output: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | 0 | my ($self, $name) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 0 | ▶ | die "Output $name not found in " . $self->name if (not defined $self->outputs or not defined $self->outputs->{ $name }); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $self->outputs and defined $self->outputs->{$name}
MC/DC0%0/2
defined $self->outputs and defined $self->outputs->{$name}
defined $self->outputs
defined $self->outputs->{$name}
Truth table0%0/3
A and B
A= defined $self->outputsB= defined $self->outputs->{$name}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | 0 | return $self->outputs->{ $name }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | 0 | ▶ | sub undeploy { } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
undeploy: not called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | 0 | ▶ | sub redeploy { } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
redeploy: not called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | 0 | ▶ | sub deploy { } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
deploy: not called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | 0 | ▶ | sub new_with_roles { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new_with_roles: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | 0 | my ($class, $params, @roles) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | 0 | use_module($_) for (@roles); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | 0 | my $new_class = Moose::Util::with_traits('CCfnX::Deployment', @roles); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | 0 | my $dep = $new_class->new(%$params); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | 0 | return $dep; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 15 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||