File Coverage

blib/lib/Starch/Plugin/ForState.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::ForState;
2 5     5   2985 use 5.008001;
  5         18  
3 5     5   29 use strictures 2;
  5         38  
  5         164  
4             our $VERSION = '0.11';
5              
6             =head1 NAME
7              
8             Starch::Plugin::ForState - Base role for Starch::State plugins.
9              
10             =head1 SYNOPSIS
11              
12             package MyPlugin::State;
13             use Moo;
14             with 'Starch::Plugin::ForState';
15             sub foo { print 'bar' }
16              
17             my $starch = Starch->new(
18             plugins => ['MyPlugin::State'],
19             ...,
20             );
21             $starch->state->foo(); # bar
22              
23             =head1 DESCRIPTION
24              
25             This role provides no additional functionality to
26             state plugins. All it does is labels a plugin as a state
27             plugin so that Starch knows which class type it applies to.
28              
29             See L for more information.
30              
31             =cut
32              
33 5     5   897 use Moo::Role;
  5         11  
  5         27  
34 5     5   1639 use namespace::clean;
  5         11  
  5         34  
35              
36             1;
37             __END__