line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DBIx::Class::DeploymentHandler::WithApplicatorDumple; |
2
|
|
|
|
|
|
|
$DBIx::Class::DeploymentHandler::WithApplicatorDumple::VERSION = '0.002233'; |
3
|
12
|
|
|
42
|
|
13426
|
use MooseX::Role::Parameterized; |
|
12
|
|
|
|
|
697668
|
|
|
12
|
|
|
|
|
54
|
|
4
|
12
|
|
|
20
|
|
383191
|
use Module::Runtime 'use_module'; |
|
12
|
|
|
|
|
32
|
|
|
12
|
|
|
|
|
86
|
|
5
|
12
|
|
|
12
|
|
582
|
use namespace::autoclean; |
|
12
|
|
|
|
|
26
|
|
|
12
|
|
|
|
|
98
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# this is at least a little ghetto and not super well |
8
|
|
|
|
|
|
|
# thought out. Take a look at the following at some |
9
|
|
|
|
|
|
|
# point to clean it all up: |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
# http://search.cpan.org/~jjnapiork/MooseX-Role-BuildInstanceOf-0.06/lib/MooseX/Role/BuildInstanceOf.pm |
12
|
|
|
|
|
|
|
# http://github.com/rjbs/role-subsystem/blob/master/lib/Role/Subsystem.pm |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
parameter interface_role => ( |
15
|
|
|
|
|
|
|
isa => 'Str', |
16
|
|
|
|
|
|
|
required => 1, |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
parameter class_name => ( |
20
|
|
|
|
|
|
|
isa => 'Str', |
21
|
|
|
|
|
|
|
required => 1, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
parameter delegate_name => ( |
25
|
|
|
|
|
|
|
isa => 'Str', |
26
|
|
|
|
|
|
|
required => 1, |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
parameter attributes_to_copy => ( |
30
|
|
|
|
|
|
|
isa => 'ArrayRef[Str]', |
31
|
|
|
|
|
|
|
default => sub {[]}, |
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
parameter attributes_to_assume => ( |
35
|
|
|
|
|
|
|
isa => 'ArrayRef[Str]', |
36
|
|
|
|
|
|
|
default => sub {[]}, |
37
|
|
|
|
|
|
|
); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
role { |
40
|
|
|
|
|
|
|
my $p = shift; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
my $class_name = $p->class_name; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
use_module($class_name); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
my $meta = Class::MOP::class_of($class_name); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
has $_->name => %{ $_->clone } |
49
|
|
|
|
|
|
|
for grep { $_ } map $meta->find_attribute_by_name($_), @{ $p->attributes_to_copy }; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
has $p->delegate_name => ( |
52
|
|
|
|
|
|
|
is => 'ro', |
53
|
|
|
|
|
|
|
lazy_build => 1, |
54
|
|
|
|
|
|
|
does => $p->interface_role, |
55
|
|
|
|
|
|
|
handles => $p->interface_role, |
56
|
|
|
|
|
|
|
); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
method '_build_'.$p->delegate_name => sub { |
59
|
94
|
|
|
94
|
|
204
|
my $self = shift; |
|
|
|
|
94
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
11
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
$class_name->new({ |
62
|
502
|
|
|
|
|
32640
|
map { $_ => $self->$_ } |
63
|
94
|
|
|
|
|
467
|
@{ $p->attributes_to_assume }, |
64
|
94
|
|
|
|
|
193
|
@{ $p->attributes_to_copy }, |
|
94
|
|
|
|
|
901
|
|
65
|
|
|
|
|
|
|
}) |
66
|
|
|
|
|
|
|
}; |
67
|
|
|
|
|
|
|
}; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
# vim: ts=2 sw=2 expandtab |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
__END__ |