lib/Set/Associate/RefillItems/Linear.pm

filter: Statementstmt 95.6% 22 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 100% 2 / 2 totaltotal 93.7% 30 / 32 CC 1 SCAR 1.3
CC
1
Cov
96%
name
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« lib/Set/Associate/NewKey/RandomPick.pm ↑ Summary blib/lib/Set/Associate/NewKey/PickOffset.pm »
1 9 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
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 9 our $VERSION = '0.004000';
10  
11 9 our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
12  
13 9 ▶use Moose qw( with has );
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 9 with 'Set::Associate::Role::RefillItems' => { can_get_all => 1 };
16  
17  
18  
19  
20  
21  
22  
23  
24  
25 9 has items => ( isa => 'ArrayRef', is => 'rw', required => 1 );
26  
27 9 __PACKAGE__->meta->make_immutable;
28  
29 9 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
30  
31  
32  
33  
34  
35  
36  
37 0 ▶sub name { 'linear' }
Subroutine name: not called CC=1 SCAR=6.9
Pod documented
38  
39  
40  
41  
42  
43  
44  
45 10 ▶sub get_all { return @{ $_[0]->items } }
Subroutine get_all: called CC=1 SCAR=0.0
Pod documented
46  
47 9 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.004000
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) 2015 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
« lib/Set/Associate/NewKey/RandomPick.pm ↑ Summary blib/lib/Set/Associate/NewKey/PickOffset.pm »