MetaAPI/API.pm

filter: Statementstmt 100% 15 / 15 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 1 totaltotal 84.0% 21 / 25 CC 4 SCAR 11.3
CC
4
Cov
86%
get_service
4.2
BEGIN
1.0
BEGIN
1.0
CRAP 3.1
« MetaAPI/Helpers/DataAsYaml.pm ↑ Summary MetaAPI/Routes.pm »
1 package OpenStack::MetaAPI::API;
2  
3 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 #use Moo::Role;
7 #use Moo;
8  
9 sub get_service {
10 8 ▶ my (%opts) = @_;
Subroutine get_service: called CC=4 SCAR=14.2
Pod undocumented
11  
12 8 ▶ my $name = $opts{name} or die "name required";
Branch: 1 branch
BranchTrueFalseTotal
my $name = $opts{"name"} or die "name required" 0 8 8
13 8 ▶ my $auth = ref($opts{auth}) or die "auth required";
Branch: 1 branch
BranchTrueFalseTotal
my $auth = ref $opts{"auth"} or die "auth required" 0 8 8
14  
15 8 my $pkg = ucfirst $name;
16 8 $pkg = __PACKAGE__ . "::$pkg";
17  
18 8 ▶ eval qq{ require $pkg; 1 } or die "Failed to load $pkg: $@";
Branch: 1 branch
BranchTrueFalseTotal
eval " require $pkg; 1 " or die "Failed to load ${pkg}: $@" 0 8 8
19  
20 8 delete $opts{name};
21  
22 8 return $pkg->new(%opts);
23 }
24  
25 6 1;
26  
27 __END__
28  
29 =pod
30  
31 =encoding UTF-8
32  
33 =head1 NAME
34  
35 OpenStack::MetaAPI::API
36  
37 =head1 VERSION
38  
39 version 0.002
40  
41 =head1 AUTHOR
42  
43 Nicolas R <atoomic@cpan.org>
44  
45 =head1 COPYRIGHT AND LICENSE
46  
47 This software is copyright (c) 2019 by cPanel, Inc.
48  
49 This is free software; you can redistribute it and/or modify it under
50 the same terms as the Perl 5 programming language system itself.
51  
52 =cut
« MetaAPI/Helpers/DataAsYaml.pm ↑ Summary MetaAPI/Routes.pm »