File Coverage

blib/lib/RxPerl/Subscriber.pm
Criterion Covered Total %
statement 11 13 84.6
branch 3 6 50.0
condition n/a
subroutine 5 6 83.3
pod 0 4 0.0
total 19 29 65.5


line stmt bran cond sub pod time code
1             package RxPerl::Subscriber;
2 5     5   32 use strict;
  5         9  
  5         142  
3 5     5   22 use warnings;
  5         16  
  5         1078  
4              
5             our $VERSION = "v6.28.0";
6              
7             sub next {
8 6     6 0 39 my $self = shift;
9              
10 6 100       24 $self->{next}->(splice @_, 0, 1) if defined $self->{next};
11             }
12              
13             sub error {
14 0     0 0 0 my $self = shift;
15              
16 0 0       0 $self->{error}->(splice @_, 0, 1) if defined $self->{error};
17             }
18              
19             sub complete {
20 1     1 0 18 my $self = shift;
21              
22 1 50       5 $self->{complete}->() if defined $self->{complete};
23             }
24              
25 1036     1036 0 4170 sub subscription { $_[0]->{_subscription} }
26              
27             1;