| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
#!perl |
|
2
|
|
|
|
|
|
|
#PODNAME: Raisin::Entity::Object |
|
3
|
|
|
|
|
|
|
#ABSTRACT: An expose object. |
|
4
|
|
|
|
|
|
|
|
|
5
|
9
|
|
|
9
|
|
147281
|
use strict; |
|
|
9
|
|
|
|
|
21
|
|
|
|
9
|
|
|
|
|
280
|
|
|
6
|
9
|
|
|
9
|
|
50
|
use warnings; |
|
|
9
|
|
|
|
|
16
|
|
|
|
9
|
|
|
|
|
485
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package Raisin::Entity::Object; |
|
9
|
|
|
|
|
|
|
$Raisin::Entity::Object::VERSION = '0.92'; |
|
10
|
9
|
|
|
|
|
79
|
use Plack::Util::Accessor qw( |
|
11
|
|
|
|
|
|
|
desc |
|
12
|
|
|
|
|
|
|
name |
|
13
|
|
|
|
|
|
|
runtime |
|
14
|
|
|
|
|
|
|
using |
|
15
|
9
|
|
|
9
|
|
914
|
); |
|
|
9
|
|
|
|
|
522
|
|
|
16
|
9
|
|
|
9
|
|
653
|
use Types::Standard qw(Any ArrayRef HashRef); |
|
|
9
|
|
|
|
|
18
|
|
|
|
9
|
|
|
|
|
62
|
|
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new { |
|
19
|
50
|
|
|
50
|
0
|
21698
|
my ($class, $name, @params) = @_; |
|
20
|
|
|
|
|
|
|
|
|
21
|
50
|
100
|
66
|
|
|
180
|
if (scalar(@params) % 2 && ref($params[-1]) eq 'CODE') { |
|
22
|
6
|
|
|
|
|
15
|
splice @params, -1, 0, 'runtime'; |
|
23
|
|
|
|
|
|
|
} |
|
24
|
|
|
|
|
|
|
|
|
25
|
50
|
|
|
|
|
208
|
bless { name => $name, @params }, $class; |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
|
|
28
|
4
|
|
|
4
|
1
|
15
|
sub required { 1 } |
|
29
|
44
|
|
|
44
|
1
|
157
|
sub alias { shift->{as} } |
|
30
|
28
|
|
|
28
|
1
|
124
|
sub condition { shift->{if} } |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub type { |
|
33
|
9
|
|
|
9
|
1
|
27
|
my $self = shift; |
|
34
|
|
|
|
|
|
|
|
|
35
|
9
|
|
|
|
|
14
|
my $type = do { |
|
36
|
9
|
100
|
|
|
|
38
|
if ($self->{type}) { |
|
|
|
100
|
|
|
|
|
|
|
37
|
5
|
|
|
|
|
31
|
$self->{type}; |
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
elsif ($self->using) { |
|
40
|
2
|
|
|
|
|
19
|
ArrayRef[HashRef]; |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
else { |
|
43
|
2
|
|
|
|
|
15
|
Any; |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
}; |
|
46
|
|
|
|
|
|
|
|
|
47
|
9
|
|
|
|
|
242
|
$type; |
|
48
|
|
|
|
|
|
|
} |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub display_name { |
|
51
|
39
|
|
|
39
|
1
|
74
|
my $self = shift; |
|
52
|
39
|
100
|
|
|
|
75
|
$self->alias || $self->name; |
|
53
|
|
|
|
|
|
|
} |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
__END__ |