Subscription.pm

filter: Statementstmt 68.1% 15 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 0.0% 0 / 3 totaltotal 62.5% 20 / 32 CC 1 SCAR 2.5
CC
1
Cov
68%
auto_unsubscribe
2.0
unsubscribe
2.0
BEGIN
1.0
CRAP 1.3
« Base.pm ↑ Summary Message.pm »
1 package Net::NATS2::Subscription;
2  
3 5 ▶use v5.10;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 5 ▶use Net::NATS2::Base;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 5 has message_count => 0;
10 5 has $_ for qw(subject group sid callback client max_msgs);
11  
12 sub defined_max {
13 2 ▶ return defined $_[0]->{max_msgs};
Subroutine defined_max: called CC=1 SCAR=0.0
Pod undocumented
14 }
15  
16 sub auto_unsubscribe {
17 0 ▶ my $self = shift;
Subroutine auto_unsubscribe: not called CC=1 SCAR=6.9
Pod undocumented
18 0 my ($max_msgs) = @_;
19 0 $self->client->unsubscribe($self, $max_msgs);
20 0 return $self;
21 }
22  
23 sub unsubscribe {
24 0 ▶ my $self = shift;
Subroutine unsubscribe: not called CC=1 SCAR=6.9
Pod undocumented
25 0 $self->client->unsubscribe($self);
26 0 return $self;
27 }
28  
29 5 1;
« Base.pm ↑ Summary Message.pm »