File Coverage

blib/lib/Pod/Perldoc/ToToc.pm
Criterion Covered Total %
statement 18 25 72.0
branch n/a
condition n/a
subroutine 6 10 60.0
pod 1 4 25.0
total 25 39 64.1


line stmt bran cond sub pod time code
1             package Pod::Perldoc::ToToc;
2 1     1   744 use strict;
  1         2  
  1         33  
3 1     1   433 use parent qw(Pod::Perldoc::BaseTo);
  1         318  
  1         7  
4 1     1   3041 use vars qw($VERSION);
  1         2  
  1         39  
5              
6 1     1   414 use Pod::TOC;
  1         3  
  1         37  
7              
8 1     1   7 use warnings;
  1         2  
  1         32  
9 1     1   11 no warnings;
  1         3  
  1         169  
10              
11             $VERSION = '1.121';
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             =encoding utf8
28              
29             =head1 NAME
30              
31             Pod::Perldoc::ToToc - Translate Pod to a Table of Contents
32              
33             =head1 SYNOPSIS
34              
35             Use this module with C's C<-M> switch.
36              
37             % perldoc -MPod::Perldoc::ToToc Module::Name
38              
39             =head1 DESCRIPTION
40              
41             This module uses the C module to extract a table of
42             contents from a pod file.
43              
44             =head1 METHODS
45              
46             =over 4
47              
48             =item parse_from_file( FILENAME, OUTPUT_FH )
49              
50             Parse the file named in C using C and send the
51             results to the output filehandle C.
52              
53             =back
54              
55             =head1 SEE ALSO
56              
57             L
58              
59             =head1 SOURCE AVAILABILITY
60              
61             This source is in Github:
62              
63             https://github.com/briandfoy/pod-perldoc-totoc
64              
65             =head1 AUTHOR
66              
67             brian d foy, C<< >>
68              
69             =head1 COPYRIGHT AND LICENSE
70              
71             Copyright © 2006-2018, brian d foy . All rights reserved.
72              
73             You may redistribute this under the terms of the Artistic License 2.0.
74              
75             =cut
76              
77             1;