| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Pod::Perldoc::ToText; |
|
2
|
1
|
|
|
1
|
|
1005
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
36
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
|
1
|
|
|
|
|
36
|
|
|
|
1
|
|
|
|
|
45
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
6
|
use vars qw($VERSION); |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
64
|
|
|
6
|
|
|
|
|
|
|
$VERSION = '3.28'; |
|
7
|
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
4
|
use parent qw(Pod::Perldoc::BaseTo); |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
4
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
0
|
|
|
0
|
0
|
|
sub is_pageable { 1 } |
|
11
|
0
|
|
|
0
|
0
|
|
sub write_with_binmode { 0 } |
|
12
|
0
|
|
|
0
|
0
|
|
sub output_extension { 'txt' } |
|
13
|
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
754
|
use Pod::Text (); |
|
|
1
|
|
|
|
|
5213
|
|
|
|
1
|
|
|
|
|
376
|
|
|
15
|
|
|
|
|
|
|
|
|
16
|
0
|
|
|
0
|
0
|
|
sub alt { shift->_perldoc_elem('alt' , @_) } |
|
17
|
0
|
|
|
0
|
0
|
|
sub indent { shift->_perldoc_elem('indent' , @_) } |
|
18
|
0
|
|
|
0
|
0
|
|
sub loose { shift->_perldoc_elem('loose' , @_) } |
|
19
|
0
|
|
|
0
|
0
|
|
sub quotes { shift->_perldoc_elem('quotes' , @_) } |
|
20
|
0
|
|
|
0
|
0
|
|
sub sentence { shift->_perldoc_elem('sentence', @_) } |
|
21
|
0
|
|
|
0
|
0
|
|
sub width { shift->_perldoc_elem('width' , @_) } |
|
22
|
|
|
|
|
|
|
|
|
23
|
0
|
|
0
|
0
|
0
|
|
sub new { return bless {}, ref($_[0]) || $_[0] } |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub parse_from_file { |
|
26
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
my @options = |
|
29
|
0
|
|
|
|
|
|
map {; $_, $self->{$_} } |
|
|
0
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
grep !m/^_/s, |
|
31
|
|
|
|
|
|
|
keys %$self |
|
32
|
|
|
|
|
|
|
; |
|
33
|
|
|
|
|
|
|
|
|
34
|
0
|
0
|
0
|
|
|
|
defined(&Pod::Perldoc::DEBUG) |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
and Pod::Perldoc::DEBUG() |
|
36
|
|
|
|
|
|
|
and print "About to call new Pod::Text ", |
|
37
|
|
|
|
|
|
|
$Pod::Text::VERSION ? "(v$Pod::Text::VERSION) " : '', |
|
38
|
|
|
|
|
|
|
"with options: ", |
|
39
|
|
|
|
|
|
|
@options ? "[@options]" : "(nil)", "\n"; |
|
40
|
|
|
|
|
|
|
; |
|
41
|
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
Pod::Text->new(@options)->parse_from_file(@_); |
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 NAME |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Pod::Perldoc::ToText - let Perldoc render Pod as plaintext |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
perldoc -o text Some::Modulename |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
This is a "plug-in" class that allows Perldoc to use |
|
58
|
|
|
|
|
|
|
Pod::Text as a formatter class. |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
It supports the following options, which are explained in |
|
61
|
|
|
|
|
|
|
L: alt, indent, loose, quotes, sentence, width |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
For example: |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
perldoc -o text -w indent:5 Some::Modulename |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 CAVEAT |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
This module may change to use a different text formatter class in the |
|
70
|
|
|
|
|
|
|
future, and this may change what options are supported. |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
L, L |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 COPYRIGHT AND DISCLAIMERS |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Copyright (c) 2002 Sean M. Burke. All rights reserved. |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify it |
|
81
|
|
|
|
|
|
|
under the same terms as Perl itself. |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, but |
|
84
|
|
|
|
|
|
|
without any warranty; without even the implied warranty of |
|
85
|
|
|
|
|
|
|
merchantability or fitness for a particular purpose. |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 AUTHOR |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Current maintainer: Mark Allen C<< >> |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Past contributions from: |
|
92
|
|
|
|
|
|
|
brian d foy C<< >> |
|
93
|
|
|
|
|
|
|
Adriano R. Ferreira C<< >>, |
|
94
|
|
|
|
|
|
|
Sean M. Burke C<< >> |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=cut |
|
98
|
|
|
|
|
|
|
|