line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Starch::Plugin::ForManager; |
2
|
4
|
|
|
4
|
|
2103
|
use 5.008001; |
|
4
|
|
|
|
|
15
|
|
3
|
4
|
|
|
4
|
|
20
|
use strictures 2; |
|
4
|
|
|
|
|
27
|
|
|
4
|
|
|
|
|
139
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.11'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
Starch::Plugin::ForManager - Base role for Starch plugins. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 SYNOPSIS |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package MyPlugin::Manager; |
13
|
|
|
|
|
|
|
use Moo; |
14
|
|
|
|
|
|
|
with 'Starch::Plugin::ForManager'; |
15
|
|
|
|
|
|
|
has foo => ( is=>'ro' ); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $starch = Starch->new( |
18
|
|
|
|
|
|
|
plugins => ['MyPlugin::Manager'], |
19
|
|
|
|
|
|
|
foo => 'bar', |
20
|
|
|
|
|
|
|
..., |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
print $starch->foo(); # bar |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 DESCRIPTION |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
This role provides no additional functionality to |
27
|
|
|
|
|
|
|
manager plugins. All it does is labels a plugin as a manager |
28
|
|
|
|
|
|
|
plugin so that Starch knows which class type it applies to. |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
See L for more information. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
33
|
|
|
|
|
|
|
|
34
|
4
|
|
|
4
|
|
861
|
use Moo::Role; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
24
|
|
35
|
4
|
|
|
4
|
|
1331
|
use namespace::clean; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
30
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
__END__ |