LINQ/DSL.pm

filter: Statementstmt 30.2% 68 / 225 Branchbran 7.4% 14 / 188 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 29.5% 18 / 61 Podpod 100% 54 / 54 totaltotal 29.0% 155 / 533 CC 95 SCAR 22.8
CC
95
Cov
20%
Where
12.0
GroupJoin
12.0
GroupBy
12.0
CRAP 9.8
↑ Summary LINQ/FieldSet/Assertion.pm »
1 2 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package LINQ::DSL;
6  
7 2 our $AUTHORITY = 'cpan:TOBYINK';
8 2 our $VERSION = '0.003';
9  
10 2 ▶use LINQ ();
Subroutine BEGIN: called CC=1 SCAR=0.0
11 2 ▶use LINQ::Util -all;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 2 ▶use Exporter::Shiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 2 our %EXPORT_TAGS = (
16 essential => [qw/
17 Linq From Where Select Join GroupBy ForEach DefaultIfEmpty HashSmush
18 /],
19 join => [qw/
20 LeftJoin RightJoin InnerJoin OuterJoin GroupJoin
21 /],
22 sort => [qw/
23 OrderBy OrderByDescending Reverse
24 /],
25 filter => [qw/
26 Distinct Take TakeWhile Skip SkipWhile
27 /],
28 native => [qw/
29 ToList ToArray ToDictionary ToIterator
30 /],
31 aggregate => [qw/
32 Min Max Sum Average Aggregate Any All Contains Count SequenceEqual
33 /],
34 aggregate_safe => [qw/
35 Min Max Sum Average Aggregate Contains Count SequenceEqual
36 /],
37 field => [qw/
38 SelectX WhereX field fields check_fields
39 /],
40 type => [qw/
41 Cast OfType AutoObject
42 /],
43 combine => [qw/
44 Concat Union Intersect Except Zip
45 /],
46 get => [qw/
47 First FirstOrDefault Last LastOrDefault
48 Single SingleOrDefault ElementAt ElementAtOrDefault
49 /],
50 default => [qw/
51 :essential :sort :join :filter :native :aggregate :field :type :combine :get
52 /],
53 default_safe => [qw/
54 :essential :sort :join :filter :native :aggregate_safe :field :type :combine :get
55 /],
56 );
57  
58 our @EXPORT = map {
59 20 ▶ /^:(.+)$/ ? @{ $EXPORT_TAGS{$1} } : $_;
Branch: 1 branch
BranchTrueFalseTotal
/^:(.+)$/ ? : 20 0 20
60 2 } @{ $EXPORT_TAGS{'default'} };
61  
62 2 our @EXPORT_OK = @EXPORT;
63  
64 2 our $Result;
65 2 our $Final;
66  
67 1 ▶sub Linq (&) {
Subroutine Linq: called CC=2 SCAR=7.2
Pod documented
68 1 my $definition = shift;
69 1 local $Result;
70 1 local $Final = 0;
71 1 $definition->();
72 1 ▶ return @$Result if $Final eq 'LIST';
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final eq "LIST" 1 0 1
73 0 return $Result;
74 }
75  
76 {
77 2 my $ao;
78 1 ▶ sub AutoObject () {
Subroutine AutoObject: called CC=2 SCAR=7.6
Pod documented
79 1 require Types::Standard;
80 1 require Object::Adhoc;
81 1 ▶ $ao ||= Types::Standard::Object()->plus_coercions(
Condition33%1/3
$ao ||= Types::Standard::Object()->plus_coercions(Types::Standard::HashRef(), \&Object::Adhoc::object)
l!l&&r!l&&!r
010
MC/DC0%0/2
$ao ||= Types::Standard::Object()->plus_coercions(Types::Standard::HashRef(), \&Object::Adhoc::object)
$ao Types::Standard::Object()->plus_coercions(Types::Standard::HashRef(), \&Object::Adhoc::object)
Truth table33%1/3
A ||= B
A= $aoB= Types::Standard::Object()->plus_coercions(Types::Standard::HashRef(), \&Object::Adhoc::object)
ABresult
1X1
011
000
82 Types::Standard::HashRef(), \&Object::Adhoc::object,
83 );
84 }
85 }
86  
87 2 ▶sub From ($;$) {
Subroutine From: called CC=5 SCAR=21.6
Pod documented
88 1 my $source = pop;
89 1 ▶ my $type = @_ ? shift : 'source';
Branch: 1 branch
BranchTrueFalseTotal
@_ ? : 0 1 1
90
91 1 ▶ if ( $type eq 'source' ) {
Branch: 3 branches
BranchTrueFalseTotal
if ($type eq 'source') { } 1 0 1
elsif ($type eq 'range') { } 0 0 0
elsif ($type eq 'repeat') { } 0 0 0
92 1 $Result = LINQ::LINQ( $source );
93 }
94 elsif ( $type eq 'range' ) {
95 0 $Result = LINQ::Range( @$source );
96 }
97 elsif ( $type eq 'repeat' ) {
98 0 $Result = LINQ::Repeat( @$source );
99 }
100 else {
101 0 die 'unknown source';
102 }
103 1 return;
104 }
105  
106 0 ▶sub Where (&) {
Subroutine Where: not called CC=3 SCAR=24.8
Pod documented
107 0 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
108 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
109 0 $Result = $Result->where( @_ );
110 }
111  
112 0 ▶sub WhereX {
Subroutine WhereX: not called CC=1 SCAR=6.9
Pod documented
113 0 @_ = scalar LINQ::Util::check_fields( @_ );
114 0 goto \&Select;
115 }
116  
117 1 ▶sub Select (&) {
Subroutine Select: called CC=3 SCAR=11.7
Pod documented
118 1 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 1 1
119 1 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 1 1
120 1 $Result = $Result->select( @_ );
121 }
122  
123 1 ▶sub SelectX {
Subroutine SelectX: called CC=1 SCAR=0.0
Pod documented
124 1 @_ = scalar LINQ::Util::fields( @_ );
125 1 goto \&Select;
126 }
127  
128 1 ▶sub Join ($;@) {
Subroutine Join: called CC=3 SCAR=11.4
Pod documented
129 1 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 1 1
130 1 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 1 1
131 1 my $other = LINQ::LINQ( shift );
132 1 $Result = $Result->join( $other, @_ );
133 }
134  
135 1 ▶sub LeftJoin ($;@) {
Subroutine LeftJoin: called CC=1 SCAR=0.0
Pod documented
136 1 splice( @_, 1, 0, -left );
137 1 goto \&Join;
138 }
139  
140 0 ▶sub RightJoin ($;@) {
Subroutine RightJoin: not called CC=1 SCAR=6.9
Pod documented
141 0 splice( @_, 1, 0, -right );
142 0 goto \&Join;
143 }
144  
145 0 ▶sub InnerJoin ($;@) {
Subroutine InnerJoin: not called CC=1 SCAR=6.9
Pod documented
146 0 splice( @_, 1, 0, -inner );
147 0 goto \&Join;
148 }
149  
150 0 ▶sub OuterJoin ($;@) {
Subroutine OuterJoin: not called CC=1 SCAR=6.9
Pod documented
151 0 splice( @_, 1, 0, -outer );
152 0 goto \&Join;
153 }
154  
155 0 ▶sub GroupJoin ($;@) {
Subroutine GroupJoin: not called CC=3 SCAR=24.8
Pod documented
156 0 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
157 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
158 0 my $other = LINQ::LINQ( shift );
159 0 $Result = $Result->group_join( $other, @_ );
160 }
161  
162 0 ▶sub GroupBy (&) {
Subroutine GroupBy: not called CC=3 SCAR=24.8
Pod documented
163 0 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
164 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
165 0 $Result = $Result->group_by( @_ );
166 }
167  
168 0 ▶sub Distinct (&) {
Subroutine Distinct: not called CC=3 SCAR=24.8
Pod documented
169 0 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
170 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
171 0 $Result = $Result->distinct( @_ );
172 }
173  
174 1 ▶sub OrderBy {
Subroutine OrderBy: called CC=3 SCAR=11.7
Pod documented
175 1 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 1 1
176 1 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 1 1
177 1 $Result = $Result->order_by( @_ );
178 }
179  
180 0 ▶sub OrderByDescending {
Subroutine OrderByDescending: not called CC=3 SCAR=24.8
Pod documented
181 0 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
182 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
183 0 $Result = $Result->order_by_descending( @_ );
184 }
185  
186 0 ▶sub Take ($) {
Subroutine Take: not called CC=3 SCAR=24.8
Pod documented
187 0 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
188 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
189 0 $Result = $Result->take( @_ );
190 }
191  
192 0 ▶sub TakeWhile (&) {
Subroutine TakeWhile: not called CC=3 SCAR=24.8
Pod documented
193 0 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
194 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
195 0 $Result = $Result->take_while( @_ );
196 }
197  
198 0 ▶sub Skip ($) {
Subroutine Skip: not called CC=3 SCAR=24.8
Pod documented
199 0 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
200 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
201 0 $Result = $Result->skip( @_ );
202 }
203  
204 0 ▶sub SkipWhile (&) {
Subroutine SkipWhile: not called CC=3 SCAR=24.8
Pod documented
205 0 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
206 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
207 0 $Result = $Result->skip_while( @_ );
208 }
209  
210 0 ▶sub Concat ($) {
Subroutine Concat: not called CC=3 SCAR=24.8
Pod documented
211 0 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
212 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
213 0 my $other = LINQ::LINQ( shift );
214 0 $Result = $Result->concat( $other, @_ );
215 }
216  
217 0 ▶sub Reverse () {
Subroutine Reverse: not called CC=3 SCAR=24.8
Pod documented
218 0 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
219 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
220 0 $Result = $Result->reverse();
221 }
222  
223 0 ▶sub Zip {
Subroutine Zip: not called CC=3 SCAR=24.8
Pod documented
224 0 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
225 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
226 0 my $other = LINQ::LINQ( shift );
227 0 $Result = $Result->zip( $other, @_ );
228 }
229  
230 0 ▶sub DefaultIfEmpty ($) {
Subroutine DefaultIfEmpty: not called CC=3 SCAR=24.8
Pod documented
231 0 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
232 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
233 0 $Result = $Result->default_if_empty( @_ );
234 }
235  
236 1 ▶sub Cast ($) {
Subroutine Cast: called CC=3 SCAR=11.7
Pod documented
237 1 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 1 1
238 1 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 1 1
239 1 $Result = $Result->cast( @_ );
240 }
241  
242 0 ▶sub OfType ($) {
Subroutine OfType: not called CC=3 SCAR=24.8
Pod documented
243 0 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
244 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
245 0 $Result = $Result->of_type( @_ );
246 }
247  
248 0 ▶sub Min (&) {
Subroutine Min: not called CC=3 SCAR=24.8
Pod documented
249 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
250 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
251 0 $Result = $Result->min( @_ );
252 }
253  
254 0 ▶sub Max (&) {
Subroutine Max: not called CC=3 SCAR=24.8
Pod documented
255 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
256 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
257 0 $Result = $Result->max( @_ );
258 }
259  
260 0 ▶sub Sum (&) {
Subroutine Sum: not called CC=3 SCAR=24.8
Pod documented
261 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
262 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
263 0 $Result = $Result->sum( @_ );
264 }
265  
266 0 ▶sub Average (&) {
Subroutine Average: not called CC=3 SCAR=24.8
Pod documented
267 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
268 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
269 0 $Result = $Result->average( @_ );
270 }
271  
272 0 ▶sub Aggregate (&;@) {
Subroutine Aggregate: not called CC=3 SCAR=24.8
Pod documented
273 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
274 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
275 0 $Result = $Result->aggregate( @_ );
276 }
277  
278 0 ▶sub First (&) {
Subroutine First: not called CC=3 SCAR=24.8
Pod documented
279 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
280 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
281 0 $Result = $Result->first( @_ );
282 }
283  
284 0 ▶sub FirstOrDefault (&$) {
Subroutine FirstOrDefault: not called CC=3 SCAR=24.8
Pod documented
285 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
286 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
287 0 $Result = $Result->first_or_default( @_ );
288 }
289  
290 0 ▶sub Last (&) {
Subroutine Last: not called CC=3 SCAR=24.8
Pod documented
291 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
292 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
293 0 $Result = $Result->last( @_ );
294 }
295  
296 0 ▶sub LastOrDefault (&$) {
Subroutine LastOrDefault: not called CC=3 SCAR=24.8
Pod documented
297 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
298 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
299 0 $Result = $Result->last_or_default( @_ );
300 }
301  
302 0 ▶sub Single (&) {
Subroutine Single: not called CC=3 SCAR=24.8
Pod documented
303 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
304 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
305 0 $Result = $Result->single( @_ );
306 }
307  
308 0 ▶sub SingleOrDefault (&$) {
Subroutine SingleOrDefault: not called CC=3 SCAR=24.8
Pod documented
309 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
310 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
311 0 $Result = $Result->single_or_default( @_ );
312 }
313  
314 0 ▶sub ElementAt (&) {
Subroutine ElementAt: not called CC=3 SCAR=24.8
Pod documented
315 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
316 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
317 0 $Result = $Result->element_at( @_ );
318 }
319  
320 0 ▶sub ElementAtOrDefault (&$) {
Subroutine ElementAtOrDefault: not called CC=3 SCAR=24.8
Pod documented
321 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
322 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
323 0 $Result = $Result->element_at_or_default( @_ );
324 }
325  
326 0 ▶sub Any (&) {
Subroutine Any: not called CC=3 SCAR=24.8
Pod documented
327 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
328 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
329 0 $Result = $Result->any( @_ );
330 }
331  
332 0 ▶sub All (&) {
Subroutine All: not called CC=3 SCAR=24.8
Pod documented
333 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
334 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
335 0 $Result = $Result->all( @_ );
336 }
337  
338 0 ▶sub Contains {
Subroutine Contains: not called CC=3 SCAR=24.8
Pod documented
339 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
340 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
341 0 $Result = $Result->contains( @_ );
342 }
343  
344 0 ▶sub Count () {
Subroutine Count: not called CC=3 SCAR=24.8
Pod documented
345 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
346 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
347 0 $Result = $Result->count();
348 }
349  
350 1 ▶sub ToList () {
Subroutine ToList: called CC=3 SCAR=11.4
Pod documented
351 1 ▶ die if $Final; $Final = 'LIST';
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 1 1
352 1 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 1 1
353 1 $Result = [ $Result->to_list() ];
354 }
355  
356 0 ▶sub ToArray () {
Subroutine ToArray: not called CC=3 SCAR=24.8
Pod documented
357 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
358 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
359 0 $Result = $Result->to_array();
360 }
361  
362 0 ▶sub ToDictionary (&) {
Subroutine ToDictionary: not called CC=3 SCAR=24.8
Pod documented
363 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
364 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
365 0 $Result = $Result->to_dictionary( @_ );
366 }
367  
368 0 ▶sub ToIterator () {
Subroutine ToIterator: not called CC=3 SCAR=24.8
Pod documented
369 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
370 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
371 0 $Result = $Result->to_iterator();
372 }
373  
374 0 ▶sub ForEach (&) {
Subroutine ForEach: not called CC=3 SCAR=24.8
Pod documented
375 0 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
376 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
377 0 $Result->foreach( @_ );
378 }
379  
380 0 ▶sub Union {
Subroutine Union: not called CC=3 SCAR=24.8
Pod documented
381 0 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
382 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
383 0 my $other = LINQ::LINQ( shift );
384 0 $Result = $Result->union( $other, @_ );
385 }
386  
387 0 ▶sub Intersect {
Subroutine Intersect: not called CC=3 SCAR=24.8
Pod documented
388 0 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
389 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
390 0 my $other = LINQ::LINQ( shift );
391 0 $Result = $Result->intersect( $other, @_ );
392 }
393  
394 0 ▶sub Except {
Subroutine Except: not called CC=3 SCAR=24.8
Pod documented
395 0 ▶ die if $Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
396 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
397 0 my $other = LINQ::LINQ( shift );
398 0 $Result = $Result->except( $other, @_ );
399 }
400  
401 0 ▶sub SequenceEqual {
Subroutine SequenceEqual: not called CC=3 SCAR=24.8
Pod documented
402 0 ▶ die if $Final; ++$Final;
Branch: 1 branch
BranchTrueFalseTotal
if $LINQ::DSL::Final 0 0 0
403 0 ▶ die unless $Result;
Branch: 1 branch
BranchTrueFalseTotal
unless $LINQ::DSL::Result 0 0 0
404 0 my $other = LINQ::LINQ( shift );
405 0 $Result = $Result->sequence_equal( $other, @_ );
406 }
407  
408 1 ▶sub HashSmush {
Subroutine HashSmush: called CC=1 SCAR=0.0
Pod documented
409 1 require Object::Adhoc;
410 5 ▶ return sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
411 5 my %smushed = map %$_, grep defined, reverse @_;
412 5 Object::Adhoc::object(\%smushed);
413 }
414 1 }
415  
416 2 1;
417  
418 __END__
↑ Summary LINQ/FieldSet/Assertion.pm »