line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Brickyard::Role::PluginBundle; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
84213
|
use 5.010; |
|
4
|
|
|
|
|
18
|
|
|
4
|
|
|
|
|
163
|
|
4
|
4
|
|
|
4
|
|
25
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
113
|
|
5
|
4
|
|
|
4
|
|
19
|
use strict; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
132
|
|
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
29
|
use Role::Basic allow => 'Brickyard::Accessor'; |
|
4
|
|
|
|
|
18
|
|
|
4
|
|
|
|
|
35
|
|
8
|
4
|
|
|
4
|
|
401
|
use Brickyard::Accessor new => 1, rw => [qw(brickyard)]; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
39
|
|
9
|
|
|
|
|
|
|
requires 'bundle_config'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub _exp { |
12
|
1
|
|
|
1
|
|
2
|
my ($self, $package) = @_; |
13
|
1
|
|
|
|
|
3
|
$self->brickyard->expand_package($package); |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
1; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 NAME |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Brickyard::Role::PluginBundle - Role to use for plugin bundles |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 SYNOPSIS |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
package My::App::PluginBundle::Foo; |
24
|
|
|
|
|
|
|
use Role::Basic 'with'; |
25
|
|
|
|
|
|
|
with qw(Brickyard Role::Plugin); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub bundle_config { |
28
|
|
|
|
|
|
|
[ |
29
|
|
|
|
|
|
|
[ '@Default/Uppercase', $_[0]->_exp('Uppercase'), {} ], |
30
|
|
|
|
|
|
|
[ '@Default/Repeat', $_[0]->_exp('Repeat'), { times => 3 } ] |
31
|
|
|
|
|
|
|
]; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 METHODS |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head2 new |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Constructs a new object. Takes an optional hash of arguments to initialize the |
39
|
|
|
|
|
|
|
object. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head2 brickyard |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Read-write accessor for the L object that created this object. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head2 _exp |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Takes a package name and delegates to the brickyard's C |
48
|
|
|
|
|
|
|
method. |