File Coverage

blib/lib/Protocol/Database/PostgreSQL/Backend/NotificationResponse.pm
Criterion Covered Total %
statement 9 12 75.0
branch n/a
condition n/a
subroutine 3 4 75.0
pod 1 1 100.0
total 13 17 76.4


line stmt bran cond sub pod time code
1             package Protocol::Database::PostgreSQL::Backend::NotificationResponse;
2              
3 1     1   7 use strict;
  1         2  
  1         34  
4 1     1   22 use warnings;
  1         3  
  1         47  
5              
6             our $VERSION = '1.005'; # VERSION
7              
8 1     1   9 use parent qw(Protocol::Database::PostgreSQL::Backend);
  1         2  
  1         5  
9              
10             =head1 NAME
11              
12             Protocol::Database::PostgreSQL::Backend::NotificationResponse
13              
14             =head1 DESCRIPTION
15              
16             =cut
17              
18             sub new_from_message {
19 0     0 1   my ($class, $msg) = @_;
20 0           (undef, my $size, my $pid, my $channel, my $data) = unpack('C1N1N1Z*Z*', $msg);
21 0           return $class->new(
22             pid => $pid,
23             channel => $channel,
24             data => $data
25             );
26             }
27              
28             1;
29              
30             =head1 AUTHOR
31              
32             Tom Molesworth
33              
34             =head1 LICENSE
35              
36             Copyright Tom Molesworth 2010-2019. Licensed under the same terms as Perl itself.
37