File Coverage

blib/lib/Convos/Archive.pm
Criterion Covered Total %
statement 6 9 66.6
branch n/a
condition n/a
subroutine 2 5 40.0
pod 3 3 100.0
total 11 17 64.7


line stmt bran cond sub pod time code
1             package Convos::Archive;
2              
3 1     1   330 use Carp qw/croak/;
  1         2  
  1         55  
4              
5             =head1 NAME
6              
7             Convos::Archive - Convos message archiver
8              
9             =head1 DESCRIPTION
10              
11             L is used to archive messages, making them accessible
12             from a storage on disk instead of in memory.
13              
14             =cut
15              
16 1     1   4 use Mojo::Base -base;
  1         1  
  1         5  
17              
18             =head1 METHODS
19              
20             =head2 flush
21              
22             $self = $self->flush($conn);
23              
24             Will flush all messages for a connection.
25              
26             =cut
27              
28 0     0 1   sub flush { croak 'Method "flush" not implemented by subclass' }
29              
30             =head2 save
31              
32             $self = $self->save($connection, $data);
33              
34             Write a log C<$message> from a C<$connection> message.
35              
36             =head2 search
37              
38             $self = $self->search(sub { my ($self, @messages) = @_; });
39              
40             Used to retrieve a list of messages with the same format as L would
41             take as input.
42              
43             =cut
44              
45 0     0 1   sub save { die "save() is not implemented for $_[0]" }
46 0     0 1   sub search { die "search() is not implemented for $_[0]" }
47              
48             =head1 COPYRIGHT
49              
50             See L.
51              
52             =head1 AUTHOR
53              
54             Jan Henning Thorsen - C
55              
56             Marcus Ramberg - C
57              
58             =cut
59              
60             1;