line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Sledge::Plugin::ShowText; |
2
|
1
|
|
|
1
|
|
21333
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
33
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
5
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
109
|
|
5
|
|
|
|
|
|
|
$VERSION = '0.03'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub import { |
8
|
1
|
|
|
1
|
|
7
|
my $class = shift; |
9
|
1
|
|
|
|
|
2
|
my $pkg = caller(0); |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
10
|
no strict 'refs'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
162
|
|
12
|
1
|
|
|
|
|
2
|
*{"$pkg\::show_text"} = \&show_text; |
|
1
|
|
|
|
|
10
|
|
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub show_text { |
16
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
17
|
0
|
|
|
|
|
|
my $content = shift; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
$self->r->header_out('Pragma' => 'no-cache'); |
20
|
0
|
|
|
|
|
|
$self->r->header_out('Cache-Control' => 'no-cache'); |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
$self->r->content_type("text/plain"); |
23
|
0
|
|
|
|
|
|
$self->set_content_length(length $content); |
24
|
0
|
|
|
|
|
|
$self->send_http_header; |
25
|
0
|
|
|
|
|
|
$self->r->print($content); |
26
|
0
|
|
|
|
|
|
$self->invoke_hook('AFTER_OUTPUT'); |
27
|
0
|
|
|
|
|
|
$self->finished(1); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
__END__ |