File Coverage

lib/XCAP/Client/Document.pm
Criterion Covered Total %
statement 1 3 33.3
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 2 4 50.0


line stmt bran cond sub pod time code
1              
2             package XCAP::Client::Document;
3              
4 1     1   3119 use Moose;
  0            
  0            
5              
6             has connection => (
7             is => 'rw',
8             isa => 'Object',
9             required => 1,
10             );
11              
12             has content => (
13             is => 'rw',
14             isa => 'Str',
15             );
16              
17             sub fetch { $_[0]->connection->get; }
18              
19             sub delete { $_[0]->connection->delete; }
20              
21             sub create {
22             my $self = shift;
23             $self->connection->content($self->content);
24             $self->connection->put;
25             }
26              
27             sub replace {
28             my $self = shift;
29             $self->connection->content($self->content);
30             $self->connection->delete;
31             $self->connection->put;
32             }
33              
34              
35             1;
36