| line | stmt | bran | cond | sub | pod | time | code | 
| 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 |  |  | 36 |  | 306 | use strict; | 
|  | 36 |  |  |  |  | 127 |  | 
|  | 36 |  |  |  |  | 1170 |  | 
| 20 | 36 |  |  | 36 |  | 205 | use warnings; | 
|  | 36 |  |  |  |  | 97 |  | 
|  | 36 |  |  |  |  | 1065 |  | 
| 21 | 36 |  |  | 36 |  | 201 | use Carp qw{ carp croak }; | 
|  | 36 |  |  |  |  | 84 |  | 
|  | 36 |  |  |  |  | 2439 |  | 
| 22 |  |  |  |  |  |  |  | 
| 23 |  |  |  |  |  |  | our $VERSION = 0.48; | 
| 24 |  |  |  |  |  |  |  | 
| 25 | 36 |  |  | 36 |  | 15680 | use Webservice::OVH::Hosting::Web; | 
|  | 36 |  |  |  |  | 111 |  | 
|  | 36 |  |  |  |  | 5002 |  | 
| 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 |  |  |  |  |  |  | sub _new { | 
| 45 |  |  |  |  |  |  |  | 
| 46 | 0 |  |  | 0 |  |  | my ( $class, %params ) = @_; | 
| 47 |  |  |  |  |  |  |  | 
| 48 | 0 | 0 |  |  |  |  | die "Missing module"  unless $params{module}; | 
| 49 | 0 | 0 |  |  |  |  | die "Missing wrapper" unless $params{wrapper}; | 
| 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 |  |  |  |  |  |  | sub web { | 
| 62 |  |  |  |  |  |  |  | 
| 63 | 0 |  |  | 0 | 0 |  | my ($self) = @_; | 
| 64 |  |  |  |  |  |  |  | 
| 65 | 0 |  |  |  |  |  | return $self->{_web}; | 
| 66 |  |  |  |  |  |  | } | 
| 67 |  |  |  |  |  |  |  | 
| 68 |  |  |  |  |  |  | 1; |