| 1 | package Iterator::Flex::Role::Exhaustion::PassthroughThrow; | ||||||||||
| 2 | |||||||||||
| 3 | # ABSTRACT: signal exhaustion by transitioning to exhausted state and throwing exception | ||||||||||
| 4 | |||||||||||
| 5 | 3 | ▶ | use v5.28; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 3 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 3 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 3 | our $VERSION = '0.33'; | |||||||||
| 10 | |||||||||||
| 11 | 3 | ▶ | use Role::Tiny; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 3 | ▶ | use experimental 'signatures'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | 3 | ▶ | use namespace::clean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | |||||||||||
| 15 | |||||||||||
| 16 | |||||||||||
| 17 | |||||||||||
| 18 | |||||||||||
| 19 | |||||||||||
| 20 | |||||||||||
| 21 | |||||||||||
| 22 | |||||||||||
| 23 | |||||||||||
| 24 | |||||||||||
| 25 | |||||||||||
| 26 | |||||||||||
| 27 | |||||||||||
| 28 | |||||||||||
| 29 | |||||||||||
| 30 | |||||||||||
| 31 | |||||||||||
| 32 | |||||||||||
| 33 | |||||||||||
| 34 | |||||||||||
| 35 | |||||||||||
| 36 | ▶ | sub signal_exhaustion ( $self, @exception ) { | |||||||||
|
Subroutine
signal_exhaustion: called CC=2 SCAR=9.2
Pod
documented
| |||||||||||
| 37 | 2 | $self->set_exhausted; | |||||||||
| 38 | |||||||||||
| 39 | 2 | ▶ | die( @exception ) if @exception; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 40 | 0 | require Iterator::Flex::Failure; | |||||||||
| 41 | 0 | Iterator::Flex::Failure::Exhausted->throw; | |||||||||
| 42 | } | ||||||||||
| 43 | |||||||||||
| 44 | |||||||||||
| 45 | 3 | 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__ | ||||||||||