File Coverage

blib/lib/Iterator/Flex/Role/Exhaustion/PassthroughThrow.pm
Criterion Covered Total %
statement 23 25 92.0
branch 1 2 50.0
condition n/a
subroutine 7 7 100.0
pod 1 1 100.0
total 32 35 91.4


line stmt bran cond sub pod time code
1             package Iterator::Flex::Role::Exhaustion::PassthroughThrow;
2              
3             # ABSTRACT: signal exhaustion by transitioning to exhausted state and throwing exception
4              
5 3     3   197318 use v5.28;
  3         9  
6 3     3   13 use strict;
  3         3  
  3         63  
7 3     3   11 use warnings;
  3         3  
  3         157  
8              
9             our $VERSION = '0.34';
10              
11 3     3   469 use Role::Tiny;
  3         4452  
  3         25  
12 3     3   963 use experimental 'signatures';
  3         1183  
  3         14  
13 3     3   817 use namespace::clean;
  3         12972  
  3         35  
14              
15              
16              
17              
18              
19              
20              
21              
22              
23              
24              
25              
26              
27              
28              
29              
30              
31              
32              
33              
34              
35              
36 2     2 1 4 sub signal_exhaustion ( $self, @exception ) {
  2         4  
  2         2  
  2         4  
37 2         9 $self->set_exhausted;
38              
39 2 50       10 die( @exception ) if @exception;
40 0           require Iterator::Flex::Failure;
41 0           Iterator::Flex::Failure::Exhausted->throw;
42             }
43              
44              
45             1;
46              
47             #
48             # This file is part of Iterator-Flex
49             #
50             # This software is Copyright (c) 2018 by Smithsonian Astrophysical Observatory.
51             #
52             # This is free software, licensed under:
53             #
54             # The GNU General Public License, Version 3, June 2007
55             #
56              
57             __END__