File Coverage

blib/lib/Iterator/Flex/Role/Rewind/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::Rewind::Method;
2              
3             # ABSTRACT: Implement rewind as a method
4              
5 1     1   332436 use v5.28;
  1         4  
6 1     1   6 use strict;
  1         2  
  1         39  
7 1     1   6 use warnings;
  1         2  
  1         98  
8              
9             our $VERSION = '0.33';
10              
11 1     1   688 use Role::Tiny;
  1         8519  
  1         7  
12              
13 1     1   936 use namespace::clean;
  1         22990  
  1         7  
14              
15              
16              
17              
18              
19              
20              
21              
22              
23              
24              
25             around rewind => sub {
26             my $orig = shift;
27             my $self = shift;
28             $self->_apply_method_to_depends( 'rewind' );
29              
30             $self->$orig;
31             $self->_clear_state;
32              
33             return;
34             };
35              
36             *__rewind__ = \&rewind;
37              
38              
39             requires 'rewind';
40             requires '_clear_state';
41              
42             1;
43              
44             #
45             # This file is part of Iterator-Flex
46             #
47             # This software is Copyright (c) 2018 by Smithsonian Astrophysical Observatory.
48             #
49             # This is free software, licensed under:
50             #
51             # The GNU General Public License, Version 3, June 2007
52             #
53              
54             __END__