| 1 | package Sledge::Plugin::ShowText; | ||
| 2 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use vars qw($VERSION); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | $VERSION = '0.03'; | |
| 6 | |||
| 7 | 1 | ▶ | sub import { |
|
Subroutine
import: called CC=1 SCAR=0.0
| |||
| 8 | 1 | my $class = shift; | |
| 9 | 1 | my $pkg = caller(0); | |
| 10 | |||
| 11 | 1 | ▶ | no strict 'refs'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 1 | *{"$pkg\::show_text"} = \&show_text; | |
| 13 | } | ||
| 14 | |||
| 15 | 0 | ▶ | sub show_text { |
|
Subroutine
show_text: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 16 | 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 | 1; | |
| 31 | __END__ | ||