File Coverage

blib/lib/Set/Associate/RefillItems/Linear.pm
Criterion Covered Total %
statement 16 17 94.1
branch n/a
condition n/a
subroutine 6 7 85.7
pod 2 2 100.0
total 24 26 92.3


line stmt bran cond sub pod time code
1 9     9   2520 use 5.006;
  9         24  
2 9     9   37 use strict;
  9         14  
  9         225  
3 9     9   38 use warnings;
  9         16  
  9         675  
4              
5             package Set::Associate::RefillItems::Linear;
6              
7             # ABSTRACT: a refill method that replenishes the cache with a repeating set of items
8              
9             our $VERSION = '0.004001';
10              
11             our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
12              
13 9     9   667 use Moose qw( with has );
  9         386583  
  9         56  
14              
15             with 'Set::Associate::Role::RefillItems' => { can_get_all => 1 };
16              
17              
18              
19              
20              
21              
22              
23              
24              
25             has items => ( isa => 'ArrayRef', is => 'rw', required => 1 );
26              
27             __PACKAGE__->meta->make_immutable;
28              
29 9     9   36481 no Moose;
  9         14  
  9         39  
30              
31              
32              
33              
34              
35              
36              
37 0     0 1 0 sub name { 'linear' }
38              
39              
40              
41              
42              
43              
44              
45 10     10 1 14 sub get_all { return @{ $_[0]->items } }
  10         334  
46              
47             1;
48              
49             __END__
50              
51             =pod
52              
53             =encoding UTF-8
54              
55             =head1 NAME
56              
57             Set::Associate::RefillItems::Linear - a refill method that replenishes the cache with a repeating set of items
58              
59             =head1 VERSION
60              
61             version 0.004001
62              
63             =head1 CONSTRUCTOR ARGUMENTS
64              
65             =head2 items
66              
67             required ArrayRef
68              
69             =head1 METHODS
70              
71             =head2 name
72              
73             The name of this refill method ( C<linear> )
74              
75             =head2 get_all
76              
77             Get a new copy of L</items>.
78              
79             =head1 ATTRIBUTES
80              
81             =head2 items
82              
83             =head1 AUTHOR
84              
85             Kent Fredric <kentnl@cpan.org>
86              
87             =head1 COPYRIGHT AND LICENSE
88              
89             This software is copyright (c) 2017 by Kent Fredric <kentfredric@gmail.com>.
90              
91             This is free software; you can redistribute it and/or modify it under
92             the same terms as the Perl 5 programming language system itself.
93              
94             =cut