line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pod::Perldoc::ToToc; |
2
|
1
|
|
|
1
|
|
798
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
3
|
1
|
|
|
1
|
|
9839
|
use parent qw(Pod::Perldoc::BaseTo); |
|
1
|
|
|
|
|
405
|
|
|
1
|
|
|
|
|
7
|
|
4
|
1
|
|
|
1
|
|
4412
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
51
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
721
|
use Pod::TOC; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
9
|
1
|
|
|
1
|
|
5
|
no warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
134
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
$VERSION = '1.12'; |
12
|
|
|
|
|
|
|
|
13
|
0
|
|
|
0
|
0
|
|
sub is_pageable { 1 } |
14
|
0
|
|
|
0
|
0
|
|
sub write_with_binmode { 0 } |
15
|
0
|
|
|
0
|
0
|
|
sub output_extension { 'toc' } |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub parse_from_file { |
18
|
0
|
|
|
0
|
1
|
|
my( $self, $file, $output_fh ) = @_; # Pod::Perldoc object |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
my $parser = Pod::TOC->new(); |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
$parser->output_fh( $output_fh ); |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
$parser->parse_file( $file ); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 NAME |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Pod::Perldoc::ToToc - Translate Pod to a Table of Contents |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 SYNOPSIS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Use this module with C's C<-M> switch. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
% perldoc -MPod::Perldoc::ToToc Module::Name |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 DESCRIPTION |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
This module uses the C module to extract a table of |
40
|
|
|
|
|
|
|
contents from a pod file. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 METHODS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=over 4 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=item parse_from_file( FILENAME, OUTPUT_FH ) |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Parse the file named in C using C and send the |
49
|
|
|
|
|
|
|
results to the output filehandle C. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=back |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 SEE ALSO |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
L |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 SOURCE AVAILABILITY |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
This source is in Github: |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
https://github.com/briandfoy/pod-perldoc-totoc |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 AUTHOR |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
brian d foy, C<< >> |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Copyright (c) 2006-2013, brian d foy, All Rights Reserved. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
You may redistribute this under the same terms as Perl itself. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=cut |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
1; |