| 1 | package Dallycot::Value::Collection; | ||
| 2 | 30 | our $AUTHORITY = 'cpan:JSMITH'; | |
| 3 | |||
| 4 | # ABSTRACT: Base class for streams, vectors, sets, etc. | ||
| 5 | |||
| 6 | 30 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 30 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 30 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 30 | ▶ | use parent 'Dallycot::Value::Any'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 30 | ▶ | use Promises qw(deferred); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 30 | ▶ | use Scalar::Util qw(blessed); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | ▶ | sub value { } | |
|
Subroutine
value: not called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 17 | |||
| 18 | 57 | ▶ | sub is_defined { return 1 } |
|
Subroutine
is_defined: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 19 | |||
| 20 | sub calculate_length { | ||
| 21 | 0 | ▶ | my ( $self, $engine ) = @_; |
|
Subroutine
calculate_length: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 22 | |||
| 23 | 0 | return Dallycot::Value::Numeric->new( Math::BigRat->binf() ); | |
| 24 | } | ||
| 25 | |||
| 26 | sub head { | ||
| 27 | 0 | ▶ | my ($self) = @_; |
|
Subroutine
head: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 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 | ▶ | my ($self) = @_; |
|
Subroutine
tail: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 35 | 0 | my $p = deferred; | |
| 36 | 0 | $p->reject( "tail is not defined for " . blessed($self) . "." ); | |
| 37 | 0 | return $p->promise; | |
| 38 | } | ||
| 39 | |||
| 40 | 30 | 1; | |