line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pod::PseudoPod::Book::Command::buildhtml; |
2
|
|
|
|
|
|
|
# ABSTRACT: command module for C<ppbook buildhtml> |
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
2192
|
use strict; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
71
|
|
5
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
79
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
12
|
use parent 'Pod::PseudoPod::Book::Command'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
17
|
|
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
150
|
use autodie; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
17
|
|
10
|
2
|
|
|
2
|
|
12678
|
use Pod::PseudoPod::DOM::App::ToHTML; |
|
2
|
|
|
|
|
1106315
|
|
|
2
|
|
|
|
|
92
|
|
11
|
2
|
|
|
2
|
|
21
|
use File::Spec::Functions qw( catfile catdir splitpath ); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
687
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub execute |
14
|
|
|
|
|
|
|
{ |
15
|
0
|
|
|
0
|
1
|
|
my ($self, $opt, $args) = @_; |
16
|
0
|
|
|
|
|
|
my $is_epub = grep { /build_xhtml/ } @$args; |
|
0
|
|
|
|
|
|
|
17
|
0
|
0
|
|
|
|
|
my $suffix = $is_epub ? 'xhtml' : 'html'; |
18
|
0
|
|
|
|
|
|
my @files = $self->gather_files( $suffix ); |
19
|
|
|
|
|
|
|
|
20
|
0
|
0
|
|
|
|
|
push @files, '--role=epub' if $is_epub; |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
Pod::PseudoPod::DOM::App::ToHTML::process_files_with_output( @files ); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub gather_files |
26
|
|
|
|
|
|
|
{ |
27
|
0
|
|
|
0
|
0
|
|
my ($self, $suffix) = @_; |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
my @chapters; |
30
|
|
|
|
|
|
|
|
31
|
0
|
0
|
|
|
|
|
if (my @order = $self->chapter_order) |
32
|
|
|
|
|
|
|
{ |
33
|
0
|
|
|
|
|
|
my $build_prefix = $self->get_build_prefix; |
34
|
0
|
|
|
|
|
|
@chapters = map { chomp; catfile( $build_prefix, "$_.pod" ) } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
@order; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
else |
38
|
|
|
|
|
|
|
{ |
39
|
0
|
|
|
|
|
|
@chapters = $self->get_built_chapters; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
return $self->map_chapters_to_output( $suffix, 'html', @chapters ); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=pod |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=encoding UTF-8 |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 NAME |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Pod::PseudoPod::Book::Command::buildhtml - command module for C<ppbook buildhtml> |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 VERSION |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
version 1.20210620.2051 |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 AUTHOR |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
chromatic <chromatic@wgz.org> |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
This software is copyright (c) 2011 by chromatic. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
70
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |