lib/Pod/Perldoc/ToText.pm

filter: Statementstmt 53.1% 17 / 32 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 31.2% 5 / 16 Podpod 0.0% 0 / 11 totaltotal 30.1% 22 / 73 CC 6 SCAR 21.8
CC
6
Cov
40%
parse_from_file
30.0
new
6.0
is_pageable
2.0
CRAP 8.8
« lib/Pod/Perldoc/ToANSI.pm ↑ Summary lib/Pod/Perldoc/ToTerm.pm »
1 package Pod::Perldoc::ToText;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 $VERSION = '3.28';
7  
8 1 ▶use parent qw(Pod::Perldoc::BaseTo);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 0 ▶sub is_pageable { 1 }
Subroutine is_pageable: not called CC=1 SCAR=6.9
Pod undocumented
11 0 ▶sub write_with_binmode { 0 }
Subroutine write_with_binmode: not called CC=1 SCAR=6.9
Pod undocumented
12 0 ▶sub output_extension { 'txt' }
Subroutine output_extension: not called CC=1 SCAR=6.9
Pod undocumented
13  
14 1 ▶use Pod::Text ();
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 0 ▶sub alt { shift->_perldoc_elem('alt' , @_) }
Subroutine alt: not called CC=1 SCAR=6.9
Pod undocumented
17 0 ▶sub indent { shift->_perldoc_elem('indent' , @_) }
Subroutine indent: not called CC=1 SCAR=6.9
Pod undocumented
18 0 ▶sub loose { shift->_perldoc_elem('loose' , @_) }
Subroutine loose: not called CC=1 SCAR=6.9
Pod undocumented
19 0 ▶sub quotes { shift->_perldoc_elem('quotes' , @_) }
Subroutine quotes: not called CC=1 SCAR=6.9
Pod undocumented
20 0 ▶sub sentence { shift->_perldoc_elem('sentence', @_) }
Subroutine sentence: not called CC=1 SCAR=6.9
Pod undocumented
21 0 ▶sub width { shift->_perldoc_elem('width' , @_) }
Subroutine width: not called CC=1 SCAR=6.9
Pod undocumented
22  
23 0 ▶sub new { return bless {}, ref($_[0]) || $_[0] }
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
Condition0%0/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
24  
25 0 ▶sub parse_from_file {
Subroutine parse_from_file: not called CC=5 SCAR=34.0
Pod undocumented
26 0 my $self = shift;
27  
28 my @options =
29 0 map {; $_, $self->{$_} }
30 grep !m/^_/s,
31 keys %$self
32 ;
33  
34 0 ▶ defined(&Pod::Perldoc::DEBUG)
Branch: 3 branches
BranchTrueFalseTotal
defined &Pod::Perldoc::DEBUG and 0 and print "About to call new Pod::Text ", $Pod::Text::VERSION ? "(v$Pod::Text::VERSION) " : "", "with options: ", @options ? "[@options]" : "(nil)", "\n" 0 0 0
$Pod::Text::VERSION ? : 0 0 0
@options ? : 0 0 0
Condition0%0/2
defined &Pod::Perldoc::DEBUG and 0
!ll
00
MC/DC0%0/1
defined &Pod::Perldoc::DEBUG and 0
defined &Pod::Perldoc::DEBUG
Truth table0%0/2
A
A= defined &Pod::Perldoc::DEBUG
Aresult
00
11
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 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<Pod::Text>: 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<Pod::Text>, L<Pod::Perldoc>
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<< <mallen@cpan.org> >>
90  
91 Past contributions from:
92 brian d foy C<< <bdfoy@cpan.org> >>
93 Adriano R. Ferreira C<< <ferreira@cpan.org> >>,
94 Sean M. Burke C<< <sburke@cpan.org> >>
95  
96  
97 =cut
98  
« lib/Pod/Perldoc/ToANSI.pm ↑ Summary lib/Pod/Perldoc/ToTerm.pm »