File Coverage

blib/lib/Protocol/Database/PostgreSQL/Backend.pm
Criterion Covered Total %
statement 11 15 73.3
branch n/a
condition n/a
subroutine 4 5 80.0
pod 0 2 0.0
total 15 22 68.1


line stmt bran cond sub pod time code
1             package Protocol::Database::PostgreSQL::Backend;
2              
3 1     1   426 use strict;
  1         2  
  1         32  
4 1     1   6 use warnings;
  1         2  
  1         42  
5              
6             our $VERSION = '1.005'; # VERSION
7              
8 1     1   5 use parent qw(Protocol::Database::PostgreSQL::Message);
  1         2  
  1         9  
9              
10             =head1 NAME
11              
12             Protocol::Database::PostgreSQL::Backend - base class for all backend message types
13              
14             =cut
15              
16             sub new {
17 1     1 0 5 my ($class, %args) = @_;
18 1         8 return bless \%args, $class;
19             }
20              
21             sub type {
22 0     0 0   my ($self) = @_;
23 0           my ($type) = ref($self) =~ /([a-zA-Z]+)$/;
24 0           return lcfirst($type) =~ s{([A-Z])}{'_' . lc($1)}ger;
  0            
25             }
26              
27             1;
28              
29             =head1 AUTHOR
30              
31             Tom Molesworth
32              
33             =head1 LICENSE
34              
35             Copyright Tom Molesworth 2010-2019. Licensed under the same terms as Perl itself.
36