Webservice/OVH/Hosting.pm

filter: Statementstmt 58.3% 14 / 24 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 0.0% 0 / 1 totaltotal 51.4% 18 / 35 CC 3 SCAR 16.6
CC
3
Cov
50%
_new
12.0
web
2.0
BEGIN
1.0
CRAP 5.2
« Webservice/OVH/Me/Contact.pm ↑ Summary Webservice/OVH/Email.pm »
1 package Webservice::OVH::Hosting;
2  
3 =encoding utf-8
4  
5 =head1 NAME
6  
7 Webservice::OVH::Hosting
8  
9 =head1 SYNOPSIS
10  
11 =head1 DESCRIPTION
12  
13 Gives access to hostings
14  
15 =head1 METHODS
16  
17 =cut
18  
19 36 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 36 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 36 ▶use Carp qw{ carp croak };
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 36 our $VERSION = 0.48;
24  
25 36 ▶use Webservice::OVH::Hosting::Web;
Subroutine BEGIN: called CC=1 SCAR=0.0
26  
27 =head2 _new
28  
29 Internal Method to create the hosting object.
30 This method is not ment to be called external.
31  
32 =over
33  
34 =item * Parameter: $api_wrapper - ovh api wrapper object, $module - root object
35  
36 =item * Return: L<Webservice::OVH::Order>
37  
38 =item * Synopsis: Webservice::OVH::Order->_new($ovh_api_wrapper, $self);
39  
40 =back
41  
42 =cut
43  
44 0 ▶sub _new {
Subroutine _new: not called CC=3 SCAR=24.8
45  
46 0 my ( $class, %params ) = @_;
47  
48 0 ▶ die "Missing module" unless $params{module};
Branch: 1 branch
BranchTrueFalseTotal
unless $params{"module"} 0 0 0
49 0 ▶ die "Missing wrapper" unless $params{wrapper};
Branch: 1 branch
BranchTrueFalseTotal
unless $params{"wrapper"} 0 0 0
50  
51 0 my $module = $params{module};
52 0 my $api_wrapper = $params{wrapper};
53
54 0 my $web = Webservice::OVH::Hosting::Web->_new( wrapper => $api_wrapper, module => $module );
55  
56 0 my $self = bless { _module => $module, _api_wrapper => $api_wrapper, _web => $web }, $class;
57  
58 0 return $self;
59 }
60  
61 0 ▶sub web {
Subroutine web: not called CC=1 SCAR=6.9
Pod undocumented
62  
63 0 my ($self) = @_;
64  
65 0 return $self->{_web};
66 }
67  
68 36 1;
« Webservice/OVH/Me/Contact.pm ↑ Summary Webservice/OVH/Email.pm »