File Coverage

blib/lib/Iterator/Flex/Role/Reset/Method.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 19 19 100.0


line stmt bran cond sub pod time code
1             package Iterator::Flex::Role::Reset::Method;
2              
3             # ABSTRACT: Implement reset as a method
4              
5 1     1   281606 use v5.28;
  1         3  
6 1     1   5 use strict;
  1         1  
  1         20  
7 1     1   7 use warnings;
  1         1  
  1         72  
8              
9             our $VERSION = '0.33';
10              
11 1     1   478 use Role::Tiny;
  1         4815  
  1         6  
12              
13 1     1   532 use namespace::clean;
  1         13615  
  1         5  
14              
15              
16              
17              
18              
19              
20              
21              
22              
23              
24              
25             around reset => sub {
26             my $orig = shift;
27             my $self = shift;
28             $self->_apply_method_to_depends( 'reset' );
29              
30             $self->$orig;
31             $self->_clear_state;
32              
33             return;
34             };
35              
36             *__reset__ = \&reset;
37              
38              
39             requires 'reset';
40             requires '_clear_state';
41             1;
42              
43             #
44             # This file is part of Iterator-Flex
45             #
46             # This software is Copyright (c) 2018 by Smithsonian Astrophysical Observatory.
47             #
48             # This is free software, licensed under:
49             #
50             # The GNU General Public License, Version 3, June 2007
51             #
52              
53             __END__