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
|
|
112802
|
use strict; |
|
5
|
|
|
|
|
39
|
|
|
5
|
|
|
|
|
180
|
|
8
|
5
|
|
|
5
|
|
33
|
use warnings; |
|
5
|
|
|
|
|
17
|
|
|
5
|
|
|
|
|
165
|
|
9
|
5
|
|
|
5
|
|
30
|
use English; |
|
5
|
|
|
|
|
15
|
|
|
5
|
|
|
|
|
55
|
|
10
|
|
|
|
|
|
|
|
11
|
5
|
|
|
5
|
|
3305
|
use Moose; |
|
5
|
|
|
|
|
473822
|
|
|
5
|
|
|
|
|
64
|
|
12
|
|
|
|
|
|
|
extends 'Connector::Builtin'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub get { |
15
|
15
|
|
|
15
|
1
|
48
|
my $self = shift; |
16
|
15
|
|
|
|
|
30
|
my $arg = shift; |
17
|
|
|
|
|
|
|
|
18
|
15
|
|
|
|
|
153
|
return $self->{LOCATION}; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub get_meta { |
22
|
|
|
|
|
|
|
|
23
|
4
|
|
|
4
|
1
|
13
|
my $self = shift; |
24
|
4
|
|
|
|
|
38
|
return { TYPE => "scalar", VALUE => $self->{LOCATION} }; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub exists { |
28
|
|
|
|
|
|
|
|
29
|
3
|
|
|
3
|
1
|
8
|
my $self = shift; |
30
|
3
|
|
|
|
|
18
|
return 1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
5
|
|
|
5
|
|
44282
|
no Moose; |
|
5
|
|
|
|
|
14
|
|
|
5
|
|
|
|
|
36
|
|
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. |