Chunk/Store/Memory.pm

filter: Statementstmt 88.2% 15 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 2 / 2 totaltotal 87.5% 21 / 24 CC 1 SCAR 1.8
CC
1
Cov
88%
clear
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Chunk/Store.pm ↑ Summary Chunk/Store/Null.pm »
1 package Log::Log4perl::Appender::Chunk::Store::Memory;
2 2 $Log::Log4perl::Appender::Chunk::Store::Memory::VERSION = '0.013';
3 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 extends qw/Log::Log4perl::Appender::Chunk::Store/;
5  
6 2 ▶use Log::Log4perl;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 my $LOGGER = Log::Log4perl->get_logger();
9  
10 1 ▶has 'chunks' => ( is => 'rw' , isa => 'HashRef[Str]' , default => sub{ {}; });
Subroutine __ANON__: called CC=1 SCAR=0.0
11  
12  
13 0 ▶sub clear{
Subroutine clear: not called CC=1 SCAR=6.9
Pod documented
14 0 my ($self) = @_;
15 0 $self->chunks({});
16 }
17  
18 5 ▶sub store{
Subroutine store: called CC=1 SCAR=0.0
Pod documented
19 5 my ($self, $chunk_id, $big_message) = @_;
20 5 $LOGGER->trace("Storing chunk ".$chunk_id);
21 5 $self->chunks()->{$chunk_id} = $big_message;
22 }
23  
24  
25  
26 2 __PACKAGE__->meta->make_immutable();
27 __END__
« Chunk/Store.pm ↑ Summary Chunk/Store/Null.pm »