line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Nephia::Plugin::TOML; |
2
|
2
|
|
|
2
|
|
8916
|
use 5.008005; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
75
|
|
3
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
61
|
|
4
|
2
|
|
|
2
|
|
20
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
66
|
|
5
|
2
|
|
|
2
|
|
792
|
use parent 'Nephia::Plugin'; |
|
2
|
|
|
|
|
270
|
|
|
2
|
|
|
|
|
12
|
|
6
|
2
|
|
|
2
|
|
2851
|
use TOML (); |
|
2
|
|
|
|
|
46703
|
|
|
2
|
|
|
|
|
53
|
|
7
|
2
|
|
|
2
|
|
981
|
use Nephia::Response; |
|
2
|
|
|
|
|
24746
|
|
|
2
|
|
|
|
|
314
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = "0.80"; |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
1
|
60753
|
sub exports { qw/ toml_res / } |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub toml_res { |
14
|
2
|
|
|
2
|
0
|
14
|
my ($self, $context) = @_; |
15
|
|
|
|
|
|
|
return sub ($) { |
16
|
1
|
|
|
1
|
|
78
|
my $body = TOML::to_toml($_[0]); |
17
|
1
|
|
|
|
|
163
|
$context->set(res => Nephia::Response->new( |
18
|
|
|
|
|
|
|
200, |
19
|
|
|
|
|
|
|
[ |
20
|
|
|
|
|
|
|
'Content-Type' => 'text/x-toml', |
21
|
|
|
|
|
|
|
'X-Content-Type-Options' => 'nosniff', ### For IE 9 or later. See http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-1297 |
22
|
|
|
|
|
|
|
'X-Frame-Options' => 'DENY', ### Suppress loading web-page into iframe. See http://blog.mozilla.org/security/2010/09/08/x-frame-options/ |
23
|
|
|
|
|
|
|
'Cache-Control' => 'private', ### no public cache |
24
|
|
|
|
|
|
|
], |
25
|
|
|
|
|
|
|
$body |
26
|
|
|
|
|
|
|
)); |
27
|
2
|
|
|
|
|
11
|
}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |