line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Dallycot::Value::Collection; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:JSMITH'; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# ABSTRACT: Base class for streams, vectors, sets, etc. |
5
|
|
|
|
|
|
|
|
6
|
23
|
|
|
23
|
|
9505
|
use strict; |
|
23
|
|
|
|
|
41
|
|
|
23
|
|
|
|
|
938
|
|
7
|
23
|
|
|
23
|
|
100
|
use warnings; |
|
23
|
|
|
|
|
29
|
|
|
23
|
|
|
|
|
565
|
|
8
|
|
|
|
|
|
|
|
9
|
23
|
|
|
23
|
|
84
|
use utf8; |
|
23
|
|
|
|
|
1503
|
|
|
23
|
|
|
|
|
128
|
|
10
|
23
|
|
|
23
|
|
482
|
use parent 'Dallycot::Value::Any'; |
|
23
|
|
|
|
|
33
|
|
|
23
|
|
|
|
|
135
|
|
11
|
|
|
|
|
|
|
|
12
|
23
|
|
|
23
|
|
1289
|
use Promises qw(deferred); |
|
23
|
|
|
|
|
37
|
|
|
23
|
|
|
|
|
160
|
|
13
|
|
|
|
|
|
|
|
14
|
23
|
|
|
23
|
|
5782
|
use Scalar::Util qw(blessed); |
|
23
|
|
|
|
|
35
|
|
|
23
|
|
|
|
|
5328
|
|
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
0
|
0
|
|
sub value { } |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
0
|
0
|
|
sub is_defined { return 1 } |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub calculate_length { |
21
|
0
|
|
|
0
|
0
|
|
my ( $self, $engine ) = @_; |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
return Dallycot::Value::Numeric->new( Math::BigRat->binf() ); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub head { |
27
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
28
|
0
|
|
|
|
|
|
my $p = deferred; |
29
|
0
|
|
|
|
|
|
$p->reject( "head is not defined for " . blessed($self) . "." ); |
30
|
0
|
|
|
|
|
|
return $p->promise; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub tail { |
34
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
35
|
0
|
|
|
|
|
|
my $p = deferred; |
36
|
0
|
|
|
|
|
|
$p->reject( "tail is not defined for " . blessed($self) . "." ); |
37
|
0
|
|
|
|
|
|
return $p->promise; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |