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   322991 use v5.28;
  3         13  
6 3     3   18 use strict;
  3         5  
  3         90  
7 3     3   50 use warnings;
  3         7  
  3         219  
8              
9             our $VERSION = '0.33';
10              
11 3     3   658 use Role::Tiny;
  3         8271  
  3         21  
12 3     3   1469 use experimental 'signatures';
  3         2301  
  3         22  
13 3     3   1310 use namespace::clean;
  3         27741  
  3         42  
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 5 sub signal_exhaustion ( $self, @exception ) {
  2         4  
  2         6  
  2         4  
37 2         12 $self->set_exhausted;
38              
39 2 50       13 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__