Bulk/Nil.pm

filter: Statementstmt 100% 21 / 21 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 10 / 10 Podpod 100% 7 / 7 totaltotal 100% 40 / 40 CC 2 SCAR 1.7
CC
2
Cov
100%
list_cat
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Bulk/FileHandle.pm ↑ Summary Bulk/Callback.pm »
1 package Data::Stream::Bulk::Nil;
2 15 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
3 15 $Data::Stream::Bulk::Nil::AUTHORITY = 'cpan:NUFFIN';
4 }
5 {
6 15 $Data::Stream::Bulk::Nil::VERSION = '0.11';
7 }
8 15 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 # ABSTRACT: An empty L<Data::Stream::Bulk> iterator
10  
11 15 ▶use namespace::clean -except => 'meta';
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 15 with qw(Data::Stream::Bulk) => { -excludes => [qw/loaded filter list_cat all items/] };
14  
15 1 ▶sub items { return () }
Subroutine items: called CC=1 SCAR=0.0
Pod documented
16  
17 1 ▶sub all { return () }
Subroutine all: called CC=1 SCAR=0.0
Pod documented
18  
19 1 ▶sub next { undef }
Subroutine next: called CC=1 SCAR=0.0
Pod documented
20  
21 1 ▶sub is_done { 1 }
Subroutine is_done: called CC=1 SCAR=0.0
Pod documented
22  
23 12 ▶sub list_cat {
Subroutine list_cat: called CC=2 SCAR=6.9
Pod documented
24 12 my ( $self, $head, @rest ) = @_;
25  
26 12 ▶ return () unless $head;
Branch: 1 branch
BranchTrueFalseTotal
unless $head 5 7 12
27 7 return $head->list_cat(@rest);
28 }
29  
30 1 ▶sub filter { return $_[0] };
Subroutine filter: called CC=1 SCAR=0.0
Pod documented
31  
32 1 ▶sub loaded { 1 }
Subroutine loaded: called CC=1 SCAR=0.0
Pod documented
33  
34 15 __PACKAGE__->meta->make_immutable;
35  
36 15 __PACKAGE__;
37  
38  
39  
40 =pod
41  
42 =head1 NAME
43  
44 Data::Stream::Bulk::Nil - An empty L<Data::Stream::Bulk> iterator
45  
46 =head1 VERSION
47  
48 version 0.11
49  
50 =head1 SYNOPSIS
51  
52 return Data::Stream::Bulk::Nil->new; # empty set
53  
54 =head1 DESCRIPTION
55  
56 This iterator can be used to return the empty resultset.
57  
58 =head1 METHODS
59  
60 =over 4
61  
62 =item is_done
63  
64 Always returns true.
65  
66 =item next
67  
68 Always returns undef.
69  
70 =item items
71  
72 =item all
73  
74 Always returns the empty list.
75  
76 =item list_cat
77  
78 Skips $self
79  
80 =item filter
81  
82 Returns $self
83  
84 =item loaded
85  
86 Returns true.
87  
88 =back
89  
90 =head1 AUTHOR
91  
92 Yuval Kogman <nothingmuch@woobling.org>
93  
94 =head1 COPYRIGHT AND LICENSE
95  
96 This software is copyright (c) 2012 by Yuval Kogman.
97  
98 This is free software; you can redistribute it and/or modify it under
99 the same terms as the Perl 5 programming language system itself.
100  
101 =cut
102  
103  
104 __END__
« Bulk/FileHandle.pm ↑ Summary Bulk/Callback.pm »