blib/lib/Paws/API/Base64Attribute.pm

filter: Statementstmt 42.1% 8 / 19 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 1 / 3 Podpod n/a totaltotal 37.5% 9 / 24 CC 2 SCAR 13.2
CC
2
Cov
38%
__ANON__
6.0
__ANON__
2.0
BEGIN
1.0
CRAP 3.8
« blib/lib/Paws/KMS.pm ↑ Summary blib/lib/Paws/MWAA.pm »
1 package Paws::API::Base64Attribute;
2 35 ▶ use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 35 Moose::Util::meta_attribute_alias('Base64Attribute');
4  
5 35 has method => (is => 'rw', isa => 'Str', required => 1);
6 35 has decode_as => (is => 'rw', isa => 'Str', required => 1);
7  
8 0 ▶ after 'install_accessors' => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
9 0 my $self = shift;
10 0 my $realclass = $self->associated_class();
11 0 my $closure = $self->name;
12 0 my $coderef;
13 0 ▶ if ($self->decode_as eq 'Base64') {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->decode_as eq 'Base64') { } 0 0 0
14 0 ▶ $coderef = sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
15 0 my ($orig, $self) = @_;
16 0 require MIME::Base64;
17 0 return MIME::Base64::decode($self->$orig());
18 0 };
19 0 $realclass->add_around_method_modifier( $self->method => $coderef );
20 } else {
21 0 die "Unrecognized Base64Attribute decode_as attribute";
22 }
23  
24 35 };
25 35 1;
« blib/lib/Paws/KMS.pm ↑ Summary blib/lib/Paws/MWAA.pm »