Face.pm

filter: Statementstmt 100% 38 / 38 Branchbran 50.0% 2 / 4 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 10 / 10 Podpod 100% 2 / 2 totaltotal 89.8% 53 / 59 CC 4 SCAR 3.9
CC
4
Cov
91%
AUTOLOAD
2.1
access_key
2.0
endpoint
2.0
CRAP 1.5
« Face/FaceList.pm ↑ Summary Face/Person.pm »
1 package Net::Azure::CognitiveServices::Face;
2 29 ▶use 5.008001;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 29 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 29 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 29 ▶use Net::Azure::CognitiveServices::Face::Face;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 29 ▶use Net::Azure::CognitiveServices::Face::FaceList;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 29 ▶use Net::Azure::CognitiveServices::Face::Person;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 29 ▶use Net::Azure::CognitiveServices::Face::PersonGroup;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 29 our $VERSION = "0.04";
11 29 our $AUTOLOAD;
12 29 our $INSTANCES = {};
13 29 our $ACCESS_KEY;
14 29 our $ENDPOINT = 'https://westus.api.cognitive.microsoft.com';
15  
16 28 ▶sub access_key {
Subroutine access_key: called CC=2 SCAR=7.0
Pod documented
17 28 my ($class, $key) = @_;
18 28 ▶ if ($key) {
Branch: 1 branch
BranchTrueFalseTotal
if ($key) 28 0 28
19 28 $ACCESS_KEY = $key;
20 }
21 28 return $ACCESS_KEY;
22 }
23  
24 1 ▶sub endpoint {
Subroutine endpoint: called CC=2 SCAR=7.0
Pod documented
25 1 my ($class, $url) = @_;
26 1 ▶ if ($url) {
Branch: 1 branch
BranchTrueFalseTotal
if ($url) 1 0 1
27 1 $ENDPOINT = $url;
28 }
29 1 return $ENDPOINT;
30 }
31  
32 28 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: called CC=2 SCAR=7.4
33 28 my $class = shift;
34 28 my $subclass = $AUTOLOAD;
35 28 ▶ $INSTANCES->{$subclass} ||= $subclass->new(access_key => $ACCESS_KEY, endpoint => $ENDPOINT);
Condition33%1/3
$Net::Azure::CognitiveServices::Face::INSTANCES->{$subclass} ||= $subclass->new("access_key", $Net::Azure::CognitiveServices::Face::ACCESS_KEY, "endpoint", $Net::Azure::CognitiveServices::Face::ENDPOINT)
l!l&&r!l&&!r
0280
MC/DC0%0/2
$Net::Azure::CognitiveServices::Face::INSTANCES->{$subclass} ||= $subclass->new("access_key", $Net::Azure::CognitiveServices::Face::ACCESS_KEY, "endpoint", $Net::Azure::CognitiveServices::Face::ENDPOINT)
$Net::Azure::CognitiveServices::Face::INSTANCES->{$subclass} $subclass->new("access_key", $Net::Azure::CognitiveServices::Face::ACCESS_KEY, "endpoint", $Net::Azure::CognitiveServices::Face::ENDPOINT)
Truth table33%1/3
A ||= B
A= $Net::Azure::CognitiveServices::Face::INSTANCES->{$subclass}B= $subclass->new("access_key", $Net::Azure::CognitiveServices::Face::ACCESS_KEY, "endpoint", $Net::Azure::CognitiveServices::Face::ENDPOINT)
ABresult
1X1
011
000
36 28 $INSTANCES->{$subclass};
37 }
38  
39 29 1;
40 __END__
« Face/FaceList.pm ↑ Summary Face/Person.pm »