| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package App::ZofCMS::Output; |
|
3
|
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
892
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
28
|
|
|
5
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
22
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use Carp; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
399
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '1.001008'; # VERSION |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
|
11
|
0
|
|
|
0
|
0
|
|
my ( $class, $config, $template ) = @_; |
|
12
|
0
|
|
|
|
|
|
my $self = bless {}, $class; |
|
13
|
0
|
|
|
|
|
|
$self->config( $config ); |
|
14
|
0
|
|
|
|
|
|
$self->conf( $config->conf ); |
|
15
|
0
|
|
|
|
|
|
$self->template( $template ); |
|
16
|
0
|
|
|
|
|
|
return $self; |
|
17
|
|
|
|
|
|
|
} |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub headers { |
|
20
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
21
|
0
|
|
|
|
|
|
my $query = $self->config->query; |
|
22
|
0
|
0
|
0
|
|
|
|
if ( $query->{dir} eq '/' and $query->{page} eq '404' ) { |
|
23
|
0
|
|
|
|
|
|
return $self->config->cgi->header('text/html','404 Not Found'); |
|
24
|
|
|
|
|
|
|
} |
|
25
|
0
|
|
|
|
|
|
return $self->config->cgi->header( -type => 'text/html', -charset => 'utf-8' ); |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub output { |
|
29
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
30
|
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
return $self->template->html_template->output; |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub config { |
|
35
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
36
|
0
|
0
|
|
|
|
|
if ( @_ ) { |
|
37
|
0
|
|
|
|
|
|
$self->{ config } = shift; |
|
38
|
|
|
|
|
|
|
} |
|
39
|
0
|
|
|
|
|
|
return $self->{ config }; |
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub conf { |
|
44
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
45
|
0
|
0
|
|
|
|
|
if ( @_ ) { |
|
46
|
0
|
|
|
|
|
|
$self->{ conf } = shift; |
|
47
|
|
|
|
|
|
|
} |
|
48
|
0
|
|
|
|
|
|
return $self->{ conf }; |
|
49
|
|
|
|
|
|
|
} |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub template { |
|
53
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
54
|
0
|
0
|
|
|
|
|
if ( @_ ) { |
|
55
|
0
|
|
|
|
|
|
$self->{ template } = shift; |
|
56
|
|
|
|
|
|
|
} |
|
57
|
0
|
|
|
|
|
|
return $self->{ template }; |
|
58
|
|
|
|
|
|
|
} |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
|
62
|
|
|
|
|
|
|
__END__ |