line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Dallycot::Value::EmptyStream; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:JSMITH'; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# ABSTRACT: A stream with no values |
5
|
|
|
|
|
|
|
|
6
|
23
|
|
|
23
|
|
16898
|
use strict; |
|
23
|
|
|
|
|
46
|
|
|
23
|
|
|
|
|
851
|
|
7
|
23
|
|
|
23
|
|
107
|
use warnings; |
|
23
|
|
|
|
|
36
|
|
|
23
|
|
|
|
|
558
|
|
8
|
|
|
|
|
|
|
|
9
|
23
|
|
|
23
|
|
88
|
use utf8; |
|
23
|
|
|
|
|
30
|
|
|
23
|
|
|
|
|
143
|
|
10
|
23
|
|
|
23
|
|
473
|
use parent 'Dallycot::Value::Collection'; |
|
23
|
|
|
|
|
31
|
|
|
23
|
|
|
|
|
159
|
|
11
|
|
|
|
|
|
|
|
12
|
23
|
|
|
23
|
|
1460
|
use Promises qw(deferred); |
|
23
|
|
|
|
|
40
|
|
|
23
|
|
|
|
|
160
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $INSTANCE; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub new { |
17
|
0
|
|
0
|
0
|
0
|
|
return $INSTANCE ||= bless [] => __PACKAGE__; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub to_rdf { |
21
|
0
|
|
|
0
|
0
|
|
my($self, $model) = @_; |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
return $model -> add_list; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub prepend { |
27
|
0
|
|
|
0
|
0
|
|
my ( $self, @things ) = @_; |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
my $stream = Dallycot::Value::Stream->new( shift @things ); |
30
|
0
|
|
|
|
|
|
foreach my $thing (@things) { |
31
|
0
|
|
|
|
|
|
$stream = Dallycot::Value::Stream->new( $thing, $stream ); |
32
|
|
|
|
|
|
|
} |
33
|
0
|
|
|
|
|
|
return $stream; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
0
|
0
|
|
sub as_text { return "[ ]" } |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
0
|
0
|
|
sub is_empty { return 1 } |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
0
|
0
|
|
sub is_defined { return 1 } |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
0
|
|
|
sub _type { return 'Stream' } |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub calculate_length { |
45
|
0
|
|
|
0
|
0
|
|
my ( $self, $engine ) = @_; |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
return $engine->ZERO; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub calculate_reverse { |
51
|
0
|
|
|
0
|
0
|
|
my ( $self, $engine ) = @_; |
52
|
|
|
|
|
|
|
|
53
|
0
|
|
|
|
|
|
my $d = deferred; |
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
$d->resolve($self); |
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
return $d->promise; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub apply_map { |
61
|
0
|
|
|
0
|
0
|
|
my ( $self, $engine, $transform ) = @_; |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
return $self; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub apply_filter { |
67
|
0
|
|
|
0
|
0
|
|
my ( $self, $engine, $transform ) = @_; |
68
|
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
return $self; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub value_at { |
73
|
0
|
|
|
0
|
0
|
|
my $p = deferred; |
74
|
|
|
|
|
|
|
|
75
|
0
|
|
|
|
|
|
$p->resolve( Dallycot::Value::Undefined->new ); |
76
|
|
|
|
|
|
|
|
77
|
0
|
|
|
|
|
|
return $p->promise; |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub head { |
81
|
0
|
|
|
0
|
0
|
|
my $p = deferred; |
82
|
|
|
|
|
|
|
|
83
|
0
|
|
|
|
|
|
$p->resolve( Dallycot::Value::Undefined->new ); |
84
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
|
return $p->promise; |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
sub tail { |
89
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
90
|
|
|
|
|
|
|
|
91
|
0
|
|
|
|
|
|
my $p = deferred; |
92
|
|
|
|
|
|
|
|
93
|
0
|
|
|
|
|
|
$p->resolve($self); |
94
|
|
|
|
|
|
|
|
95
|
0
|
|
|
|
|
|
return $p->promise; |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
1; |