| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Role::EPUB; |
|
2
|
|
|
|
|
|
|
# ABSTRACT: an EPUB XHTML formatter role for PseudoPod DOM trees |
|
3
|
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
1779
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
25
|
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
23
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use Moose::Role; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
10
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
with 'Pod::PseudoPod::DOM::Role::HTML' => |
|
10
|
|
|
|
|
|
|
{ |
|
11
|
|
|
|
|
|
|
-excludes => [qw( emit_anchor emit_index emit_body )], |
|
12
|
|
|
|
|
|
|
}; |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub emit_anchor |
|
15
|
|
|
|
|
|
|
{ |
|
16
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
17
|
0
|
|
|
|
|
|
my $anchor = $self->get_anchor; |
|
18
|
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
return qq|<span id="$anchor"></span>|; |
|
20
|
|
|
|
|
|
|
} |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub emit_index |
|
23
|
|
|
|
|
|
|
{ |
|
24
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
25
|
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
|
my $content = $self->get_anchor; |
|
27
|
0
|
0
|
|
|
|
|
$content .= $self->id if $self->type eq 'index'; |
|
28
|
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
return qq|<span id="$content"></span>|; |
|
30
|
|
|
|
|
|
|
} |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub emit_body |
|
33
|
|
|
|
|
|
|
{ |
|
34
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
35
|
0
|
|
|
|
|
|
return <<END_HTML_HEAD . $self->emit_kids( @_ ) . <<END_HTML; |
|
36
|
|
|
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?> |
|
37
|
|
|
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
|
38
|
|
|
|
|
|
|
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
39
|
|
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
|
40
|
|
|
|
|
|
|
<head> |
|
41
|
|
|
|
|
|
|
<title></title> |
|
42
|
|
|
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|
43
|
|
|
|
|
|
|
<link rel="stylesheet" href="../css/style.css" type="text/css" /> |
|
44
|
|
|
|
|
|
|
</head> |
|
45
|
|
|
|
|
|
|
<body> |
|
46
|
|
|
|
|
|
|
END_HTML_HEAD |
|
47
|
|
|
|
|
|
|
</body> |
|
48
|
|
|
|
|
|
|
</html> |
|
49
|
|
|
|
|
|
|
END_HTML |
|
50
|
|
|
|
|
|
|
} |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=pod |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=encoding UTF-8 |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 NAME |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Pod::PseudoPod::DOM::Role::EPUB - an EPUB XHTML formatter role for PseudoPod DOM trees |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 VERSION |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
version 1.20210620.2040 |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 AUTHOR |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
chromatic <chromatic@wgz.org> |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
This software is copyright (c) 2021 by chromatic. |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
77
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=cut |