| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package HTML::WebMake::Contents; |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
686
|
use HTML::WebMake::DataSource; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
22
|
|
|
7
|
1
|
|
|
1
|
|
4
|
use Carp; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
47
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
29
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
1
|
|
|
|
|
385
|
use vars qw{ |
|
11
|
|
|
|
|
|
|
@ISA |
|
12
|
1
|
|
|
1
|
|
4
|
}; |
|
|
1
|
|
|
|
|
2
|
|
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
@ISA = qw(HTML::WebMake::DataSource); |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
########################################################################### |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new ($$$$$) { |
|
20
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
|
21
|
0
|
|
0
|
|
|
|
$class = ref($class) || $class; |
|
22
|
0
|
|
|
|
|
|
my ($main, $src, $name, $attrs) = @_; |
|
23
|
0
|
|
|
|
|
|
my $self = $class->SUPER::new (@_); |
|
24
|
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
bless ($self, $class); |
|
26
|
0
|
|
|
|
|
|
$self; |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# ------------------------------------------------------------------------- |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub add_text { |
|
32
|
0
|
|
|
0
|
0
|
|
my ($self, $name, $text, $location, $lastmod) = @_; |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# if the location does not map to a file in the filesystem we can |
|
35
|
|
|
|
|
|
|
# use for dependency checking, pass in undef as the $location parameter |
|
36
|
|
|
|
|
|
|
# and the text will be used directly. |
|
37
|
|
|
|
|
|
|
|
|
38
|
0
|
0
|
|
|
|
|
if (defined $location) { |
|
39
|
0
|
|
|
|
|
|
my $wmkf = new HTML::WebMake::File($self->{main}, $location); |
|
40
|
0
|
|
|
|
|
|
$self->{main}->set_file_modtime ($location, $lastmod); |
|
41
|
0
|
|
|
|
|
|
$self->{main}->add_content ($name, $wmkf, $self->{attrs}, $text); |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
} else { |
|
44
|
0
|
|
|
|
|
|
$self->{main}->set_mapped_content ($name, $text, $self->{attrs}->{up}); |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
} |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# ------------------------------------------------------------------------- |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub add_location { |
|
51
|
0
|
|
|
0
|
0
|
|
my ($self, $name, $location, $lastmod) = @_; |
|
52
|
|
|
|
|
|
|
|
|
53
|
0
|
0
|
|
|
|
|
if (!defined $location) |
|
54
|
0
|
|
|
|
|
|
{ carp __FILE__.": undef arg in add_location"; return; } |
|
|
0
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# if the location does not map to a file in the filesystem we can |
|
57
|
|
|
|
|
|
|
# use for dependency checking, pass in undef as the $lastmod parameter. |
|
58
|
0
|
|
|
|
|
|
my $wmkf; |
|
59
|
0
|
|
|
|
|
|
$wmkf = new HTML::WebMake::File($self->{main}, $location); |
|
60
|
0
|
|
|
|
|
|
$self->{main}->set_file_modtime ($location, $lastmod); |
|
61
|
|
|
|
|
|
|
|
|
62
|
0
|
|
|
|
|
|
$self->{main}->add_content_defer_opening |
|
63
|
|
|
|
|
|
|
($name, $wmkf, $self->{attrs}, $self); |
|
64
|
|
|
|
|
|
|
} |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
# and later, HTML::WebMake::Content will call this to get the text |
|
67
|
|
|
|
|
|
|
# in question... |
|
68
|
|
|
|
|
|
|
sub get_location { |
|
69
|
0
|
|
|
0
|
0
|
|
my ($self, $location) = @_; |
|
70
|
0
|
0
|
|
|
|
|
if (!defined $location) |
|
71
|
0
|
|
|
|
|
|
{ carp __FILE__.": undef arg in get_location"; return ""; } |
|
|
0
|
|
|
|
|
|
|
|
72
|
0
|
0
|
|
|
|
|
if (!defined $self->{hdlr}) |
|
73
|
0
|
|
|
|
|
|
{ carp __FILE__.": undef hdlr in get_location"; return ""; } |
|
|
0
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
|
75
|
0
|
|
|
|
|
|
return $self->{hdlr}->get_location_contents ($location); |
|
76
|
|
|
|
|
|
|
} |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
# ------------------------------------------------------------------------- |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub as_string { |
|
81
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
|
82
|
0
|
|
|
|
|
|
""; |
|
83
|
|
|
|
|
|
|
} |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
# ------------------------------------------------------------------------- |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
1; |