File Coverage

blib/lib/Amphibic/Log/Entry.pm
Criterion Covered Total %
statement 2 4 50.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 4 6 66.6


line stmt bran cond sub pod time code
1             package # Hide from PAUSE
2             Amphibic::Log::Entry;
3             BEGIN {
4 1     1   1500 $Amphibic::Log::Entry::VERSION = '0.02';
5             }
6              
7 1     1   462 use Moose;
  0            
  0            
8              
9             has 'facility' => (
10             is => 'ro',
11             isa => 'Str',
12             required => 1,
13             );
14              
15             has 'level' => (
16             is => 'ro',
17             isa => 'Str',
18             required => 1,
19             );
20              
21             has 'message' => (
22             is => 'ro',
23             isa => 'Str',
24             required => 1,
25             );
26              
27             sub as_string {
28             my ($self) = @_;
29            
30             my $string = '['
31             . $self->facility
32             . ' '
33             . $self->level
34             . '] '
35             . $self->message;
36              
37             return $string;
38             }
39              
40             __PACKAGE__->meta->make_immutable;
41              
42             1;