| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Dancer2::Plugin::Pg; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
19329
|
use Dancer2::Plugin; |
|
|
1
|
|
|
|
|
73007
|
|
|
|
1
|
|
|
|
|
6
|
|
|
4
|
1
|
|
|
1
|
|
486
|
use Dancer2::Plugin::Pg::Core; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
118
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.07'; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
register Pg => sub { |
|
9
|
|
|
|
|
|
|
my $dsl = shift; |
|
10
|
|
|
|
|
|
|
my $connection = shift; |
|
11
|
|
|
|
|
|
|
my $conf; |
|
12
|
|
|
|
|
|
|
if($connection) { |
|
13
|
|
|
|
|
|
|
$conf = plugin_setting()->{connections}->{$connection}; |
|
14
|
|
|
|
|
|
|
}else{ |
|
15
|
|
|
|
|
|
|
if (plugin_setting()->{connections}->{default}) { |
|
16
|
|
|
|
|
|
|
$conf = plugin_setting()->{connections}->{default}; |
|
17
|
|
|
|
|
|
|
}else{ |
|
18
|
|
|
|
|
|
|
$conf = plugin_setting(); |
|
19
|
|
|
|
|
|
|
} |
|
20
|
|
|
|
|
|
|
} |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
return Dancer2::Plugin::Pg::Core->new($conf); |
|
23
|
|
|
|
|
|
|
}; |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
register_plugin; |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |