line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# ABSTRACT: document builder - role - links |
2
|
|
|
|
|
|
|
package PONAPI::Builder::Role::HasLinksBuilder; |
3
|
|
|
|
|
|
|
|
4
|
33
|
|
|
33
|
|
29281
|
use Moose::Role; |
|
33
|
|
|
|
|
68
|
|
|
33
|
|
|
|
|
280
|
|
5
|
|
|
|
|
|
|
|
6
|
33
|
|
|
33
|
|
197220
|
use PONAPI::Builder::Links; |
|
33
|
|
|
|
|
110
|
|
|
33
|
|
|
|
|
6581
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
requires 'add_self_link'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has links_builder => ( |
11
|
|
|
|
|
|
|
init_arg => undef, |
12
|
|
|
|
|
|
|
is => 'ro', |
13
|
|
|
|
|
|
|
isa => 'PONAPI::Builder::Links', |
14
|
|
|
|
|
|
|
lazy => 1, |
15
|
|
|
|
|
|
|
predicate => 'has_links_builder', |
16
|
|
|
|
|
|
|
builder => '_build_links_builder', |
17
|
|
|
|
|
|
|
handles => [qw[ |
18
|
|
|
|
|
|
|
has_links |
19
|
|
|
|
|
|
|
has_link |
20
|
|
|
|
|
|
|
]] |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
252
|
|
|
252
|
|
9996
|
sub _build_links_builder { PONAPI::Builder::Links->new( parent => $_[0] ) } |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# NOTE: |
26
|
|
|
|
|
|
|
# These need to be delegated so that they |
27
|
|
|
|
|
|
|
# can return the instance of the Builder |
28
|
|
|
|
|
|
|
# they are attached to and not the Links |
29
|
|
|
|
|
|
|
# Builder itself. |
30
|
|
|
|
|
|
|
# - SL |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub add_link { |
33
|
5
|
|
|
5
|
0
|
18
|
my ($self, @args) = @_; |
34
|
5
|
|
|
|
|
254
|
$self->links_builder->add_link( @args ); |
35
|
5
|
|
|
|
|
155
|
return $self; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub add_links { |
39
|
16
|
|
|
16
|
0
|
84
|
my ($self, @args) = @_; |
40
|
16
|
|
|
|
|
796
|
$self->links_builder->add_links( @args ); |
41
|
16
|
|
|
|
|
402
|
return $self; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
33
|
|
|
33
|
|
306
|
no Moose::Role; 1; |
|
33
|
|
|
|
|
83
|
|
|
33
|
|
|
|
|
231
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=pod |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=encoding UTF-8 |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 NAME |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
PONAPI::Builder::Role::HasLinksBuilder - document builder - role - links |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 VERSION |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
version 0.002006 |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 AUTHORS |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=over 4 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=item * |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Mickey Nasriachi <mickey@cpan.org> |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=item * |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Stevan Little <stevan@cpan.org> |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=item * |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Brian Fraser <hugmeir@cpan.org> |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=back |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
This software is copyright (c) 2016 by Mickey Nasriachi, Stevan Little, Brian Fraser. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
83
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=cut |