File Coverage

blib/lib/Starch/Plugin/AlwaysLoad.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 15 15 100.0


line stmt bran cond sub pod time code
1             package Starch::Plugin::AlwaysLoad;
2 1     1   655 use 5.008001;
  1         5  
3 1     1   6 use strictures 2;
  1         54  
  1         50  
4             our $VERSION = '0.11';
5              
6             =head1 NAME
7              
8             Starch::Plugin::AlwaysLoad - Always retrieve state data.
9              
10             =head1 SYNOPSIS
11              
12             my $starch = Starch->new(
13             plugins => ['::AlwaysLoad'],
14             ...,
15             );
16              
17             =head1 DESCRIPTION
18              
19             This plugin causes L to be always loaded
20             from the store as soon as the state object is created. By default
21             the state data is only retrieved from the store when it is first
22             accessed.
23              
24             =cut
25              
26 1     1   250 use Moo::Role;
  1         3  
  1         8  
27 1     1   421 use namespace::clean;
  1         2  
  1         12  
28              
29             with qw(
30             Starch::Plugin::ForState
31             );
32              
33             after BUILD => sub{
34             my ($self) = @_;
35              
36             $self->data();
37              
38             return;
39             };
40              
41             1;
42             __END__