Net/NATS/Subscription.pm untested

filter: Statementstmt 0.0% 0 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 16 CC 1 SCAR 6.9
CC
1
Cov
0%
auto_unsubscribe
2.0
unsubscribe
2.0
BEGIN
2.0
CRAP 2.0
1 package Net::NATS::Subscription;
2  
3 use Class::XSAccessor {
4 constructors => [ 'new' ],
5 accessors => [
6 'subject',
7 'group',
8 'sid',
9 'callback',
10 'client',
11 ],
12 lvalue_accessors => [
13 'message_count',
14 'max_msgs',
15 ],
16 defined_predicates => {
17 defined_max => 'max_msgs',
18 },
19 };
20  
21 sub auto_unsubscribe {
22 my $self = shift;
23 my ($max_msgs) = @_;
24 $self->client->unsubscribe($self, $max_msgs);
25 }
26  
27 sub unsubscribe {
28 my $self = shift;
29 $self->client->unsubscribe($self);
30 }
31  
32 1;