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   31 use strict;
  5         9  
  5         133  
3 5     5   25 use warnings;
  5         10  
  5         957  
4              
5             our $VERSION = "v6.27.0";
6              
7             sub next {
8 6     6 0 26 my $self = shift;
9              
10 6 100       20 $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 5 my $self = shift;
21              
22 1 50       5 $self->{complete}->() if defined $self->{complete};
23             }
24              
25 1042     1042 0 4148 sub subscription { $_[0]->{_subscription} }
26              
27             1;