File Coverage

blib/lib/Xen/Domain.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 17 17 100.0


line stmt bran cond sub pod time code
1             package Xen::Domain;
2              
3             =head1 NAME
4              
5             Xen::Domain - xen domain representing object
6              
7             =head1 SYNOPSIS
8              
9             my $domain = Xen::Domain->new(
10             'name' => 'lenny',
11             'id' => 1,
12             'mem' => 256,
13             'vcpus' => 2,
14             'state' => '-b----',
15             'times' => 11.5,
16             );
17            
18             print $domain->name, ' uses ', $domain->mem, 'MB of memory.', "\n";
19              
20             =head1 DESCRIPTION
21              
22             Object module representing Xen domain.
23              
24             =cut
25              
26 1     1   56719 use warnings;
  1         2  
  1         44  
27 1     1   4 use strict;
  1         2  
  1         46  
28              
29             our $VERSION = '0.01';
30              
31 1     1   5 use base 'Class::Accessor::Fast';
  1         5  
  1         898  
32              
33             =head1 PROPERTIES
34              
35             name
36             id
37             mem
38             vcpus
39             state
40             times
41              
42             =cut
43              
44             __PACKAGE__->mk_accessors(qw{
45             name
46             id
47             mem
48             vcpus
49             state
50             times
51             });
52              
53             =head1 METHODS
54              
55             =head2 new()
56              
57             Object constructor.
58              
59             =cut
60              
61             sub new {
62 1     1 1 16 my $class = shift;
63 1         21 my $self = $class->SUPER::new({ @_ });
64            
65 1         16 return $self;
66             }
67              
68             1;
69              
70              
71             __END__