line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Dallycot::AST::Tail; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:JSMITH'; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# ABSTRACT: Finds the rest of a collection |
5
|
|
|
|
|
|
|
|
6
|
23
|
|
|
23
|
|
15565
|
use strict; |
|
23
|
|
|
|
|
38
|
|
|
23
|
|
|
|
|
698
|
|
7
|
23
|
|
|
23
|
|
84
|
use warnings; |
|
23
|
|
|
|
|
28
|
|
|
23
|
|
|
|
|
439
|
|
8
|
|
|
|
|
|
|
|
9
|
23
|
|
|
23
|
|
85
|
use utf8; |
|
23
|
|
|
|
|
95
|
|
|
23
|
|
|
|
|
102
|
|
10
|
23
|
|
|
23
|
|
455
|
use parent 'Dallycot::AST'; |
|
23
|
|
|
|
|
44
|
|
|
23
|
|
|
|
|
242
|
|
11
|
23
|
|
|
23
|
|
1115
|
use Carp qw(croak); |
|
23
|
|
|
|
|
31
|
|
|
23
|
|
|
|
|
4620
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub to_string { |
14
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
return $self->[0]->to_string . '...'; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub to_rdf { |
20
|
0
|
|
|
0
|
0
|
|
my($self, $model) = @_; |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
my $bnode = $model -> bnode; |
23
|
0
|
|
|
|
|
|
$model -> add_type($bnode, 'loc:Tail'); |
24
|
0
|
|
|
|
|
|
$model -> add_expression($bnode, $self -> [0]); |
25
|
0
|
|
|
|
|
|
return $bnode; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub execute { |
29
|
0
|
|
|
0
|
0
|
|
my ( $self, $engine ) = @_; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
return $engine->execute( $self->[0] )->then( |
32
|
|
|
|
|
|
|
sub { |
33
|
0
|
|
|
0
|
|
|
my ($stream) = @_; |
34
|
|
|
|
|
|
|
|
35
|
0
|
0
|
|
|
|
|
if ( $stream->can('tail') ) { |
36
|
0
|
|
|
|
|
|
return $stream->tail($engine); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
else { |
39
|
0
|
|
|
|
|
|
croak "The tail operator requires a stream-like object."; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
} |
42
|
0
|
|
|
|
|
|
); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |