line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Ukigumo::Agent::View; |
2
|
1
|
|
|
1
|
|
2720
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
4
|
1
|
|
|
1
|
|
4
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
5
|
1
|
|
|
1
|
|
943
|
use Text::Xslate; |
|
1
|
|
|
|
|
10685
|
|
|
1
|
|
|
|
|
67
|
|
6
|
1
|
|
|
1
|
|
9
|
use List::Util qw(first); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
100
|
|
7
|
1
|
|
|
1
|
|
5
|
use File::Spec; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
173
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub make_instance { |
10
|
0
|
|
|
0
|
0
|
|
my ($class, $c) = @_; |
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
|
|
|
my $path = File::Spec->catdir($c->share_dir, 'tmpl'); |
13
|
|
|
|
|
|
|
my $xslate = Text::Xslate->new( |
14
|
|
|
|
|
|
|
syntax => 'TTerse', |
15
|
|
|
|
|
|
|
path => ["$path"], |
16
|
|
|
|
|
|
|
module => [ |
17
|
|
|
|
|
|
|
'Text::Xslate::Bridge::Star', |
18
|
|
|
|
|
|
|
'Time::Piece' => ['localtime'], |
19
|
|
|
|
|
|
|
'Time::Duration' => ['duration'], |
20
|
|
|
|
|
|
|
], |
21
|
|
|
|
|
|
|
function => { |
22
|
0
|
|
|
0
|
|
|
time => sub { time() }, |
23
|
0
|
|
|
0
|
|
|
uri_for => sub { Amon2->context()->uri_for(@_) }, |
24
|
|
|
|
|
|
|
}, |
25
|
0
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|