line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Connector::Builtin::Static |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Simple connector returning a static value for all requests |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
package Connector::Builtin::Static; |
6
|
|
|
|
|
|
|
|
7
|
5
|
|
|
5
|
|
94783
|
use strict; |
|
5
|
|
|
|
|
18
|
|
|
5
|
|
|
|
|
160
|
|
8
|
5
|
|
|
5
|
|
26
|
use warnings; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
143
|
|
9
|
5
|
|
|
5
|
|
28
|
use English; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
43
|
|
10
|
|
|
|
|
|
|
|
11
|
5
|
|
|
5
|
|
2711
|
use Moose; |
|
5
|
|
|
|
|
417002
|
|
|
5
|
|
|
|
|
63
|
|
12
|
|
|
|
|
|
|
extends 'Connector::Builtin'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub get { |
15
|
15
|
|
|
15
|
1
|
39
|
my $self = shift; |
16
|
15
|
|
|
|
|
24
|
my $arg = shift; |
17
|
|
|
|
|
|
|
|
18
|
15
|
|
|
|
|
147
|
return $self->{LOCATION}; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub get_meta { |
22
|
|
|
|
|
|
|
|
23
|
4
|
|
|
4
|
1
|
12
|
my $self = shift; |
24
|
4
|
|
|
|
|
44
|
return { TYPE => "scalar", VALUE => $self->{LOCATION} }; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub exists { |
28
|
|
|
|
|
|
|
|
29
|
3
|
|
|
3
|
1
|
7
|
my $self = shift; |
30
|
3
|
|
|
|
|
19
|
return 1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
5
|
|
|
5
|
|
35319
|
no Moose; |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
42
|
|
35
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
__END__ |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 Name |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Connector::Builtin::Simple |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 Description |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Return a static value regardless of the requested key. |
47
|
|
|
|
|
|
|
Set the value using the "LOCATION" parameter. Supports only |
48
|
|
|
|
|
|
|
scalar values using the get/get_meta call. |