| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Mojo::Rx; |
|
2
|
1
|
|
|
1
|
|
690
|
use 5.008001; |
|
|
1
|
|
|
|
|
4
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
19
|
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
25
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use Carp 'croak'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
49
|
|
|
7
|
1
|
|
|
1
|
|
6
|
use File::Basename 'dirname'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
465
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
require Exporter; |
|
10
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
|
11
|
|
|
|
|
|
|
our @EXPORT_OK = qw/ |
|
12
|
|
|
|
|
|
|
rx_observable rx_timer rx_interval rx_of rx_race rx_concat rx_merge rx_subject |
|
13
|
|
|
|
|
|
|
rx_from_event rx_from_event_array rx_defer rx_EMPTY $rx_EMPTY rx_throw_error rx_never |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
op_map op_map_to op_filter op_take op_tap op_multicast op_ref_count op_share |
|
16
|
|
|
|
|
|
|
op_take_until op_delay op_scan op_pairwise |
|
17
|
|
|
|
|
|
|
/; |
|
18
|
|
|
|
|
|
|
our %EXPORT_TAGS = (all => \@EXPORT_OK); |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $VERSION = "v0.12.0"; |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub import { |
|
23
|
1
|
|
|
1
|
|
9
|
my ($class, @keywords) = @_; |
|
24
|
|
|
|
|
|
|
|
|
25
|
1
|
|
|
|
|
80
|
my $dirname = dirname(__FILE__); |
|
26
|
1
|
|
|
|
|
3
|
my @missing; |
|
27
|
1
|
|
|
|
|
2
|
foreach my $keyword (@keywords) { |
|
28
|
0
|
0
|
|
|
|
0
|
if ($keyword eq '$rx_EMPTY') { |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
0
|
require "$dirname/Rx/internal/observable/EMPTY.pl"; |
|
30
|
|
|
|
|
|
|
} elsif ($keyword eq ':all') { |
|
31
|
0
|
|
|
|
|
0
|
require $_ foreach ( |
|
32
|
|
|
|
|
|
|
glob("$dirname/Rx/internal/observable/*"), |
|
33
|
|
|
|
|
|
|
glob("$dirname/Rx/internal/operators/*"), |
|
34
|
|
|
|
|
|
|
); |
|
35
|
|
|
|
|
|
|
} elsif (grep $keyword eq $_, @EXPORT_OK) { |
|
36
|
0
|
|
|
|
|
0
|
my $keyword = $keyword; |
|
37
|
0
|
0
|
|
|
|
0
|
my $subdir = |
|
|
|
0
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
$keyword =~ s/^op_// ? 'operators' : |
|
39
|
|
|
|
|
|
|
$keyword =~ s/^rx_// ? 'observable' : |
|
40
|
|
|
|
|
|
|
die "malformed import symbol: $keyword"; |
|
41
|
0
|
|
|
|
|
0
|
require "$dirname/Rx/internal/$subdir/$keyword.pl"; |
|
42
|
|
|
|
|
|
|
} else { |
|
43
|
0
|
|
|
|
|
0
|
push @missing, $keyword; |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
|
|
47
|
1
|
50
|
|
|
|
5
|
if (@missing) { |
|
48
|
0
|
|
|
|
|
0
|
for (my $i = 0; $i < @missing; $i++) { |
|
49
|
0
|
0
|
|
|
|
0
|
print " " if $i > 0; |
|
50
|
0
|
|
|
|
|
0
|
print qq{"$missing[$i]" is not exported by the $class module\n}; |
|
51
|
|
|
|
|
|
|
} |
|
52
|
0
|
|
|
|
|
0
|
croak "Can't continue after import errors"; |
|
53
|
|
|
|
|
|
|
} |
|
54
|
|
|
|
|
|
|
|
|
55
|
1
|
|
|
|
|
85
|
Mojo::Rx->export_to_level(1, @_); |
|
56
|
|
|
|
|
|
|
} |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |
|
60
|
|
|
|
|
|
|
__END__ |