3 package Pod::Perldoc::ToText;
7 use base qw(Pod::Perldoc::BaseTo);
10 sub write_with_binmode { 0 }
11 sub output_extension { 'txt' }
15 sub alt { shift->_perldoc_elem('alt' , @_) }
16 sub indent { shift->_perldoc_elem('indent' , @_) }
17 sub loose { shift->_perldoc_elem('loose' , @_) }
18 sub quotes { shift->_perldoc_elem('quotes' , @_) }
19 sub sentence { shift->_perldoc_elem('sentence', @_) }
20 sub width { shift->_perldoc_elem('width' , @_) }
22 sub new { return bless {}, ref($_[0]) || $_[0] }
28 map {; $_, $self->{$_} }
33 defined(&Pod::Perldoc::DEBUG)
34 and Pod::Perldoc::DEBUG()
35 and print "About to call new Pod::Text ",
36 $Pod::Text::VERSION ? "(v$Pod::Text::VERSION) " : '',
38 @options ? "[@options]" : "(nil)", "\n";
41 Pod::Text->new(@options)->parse_from_file(@_);
48 Pod::Perldoc::ToText - let Perldoc render Pod as plaintext
52 perldoc -o text Some::Modulename
56 This is a "plug-in" class that allows Perldoc to use
57 Pod::Text as a formatter class.
59 It supports the following options, which are explained in
60 L<Pod::Text>: alt, indent, loose, quotes, sentence, width
64 perldoc -o text -w indent:5 Some::Modulename
68 This module may change to use a different text formatter class in the
69 future, and this may change what options are supported.
73 L<Pod::Text>, L<Pod::Perldoc>
75 =head1 COPYRIGHT AND DISCLAIMERS
77 Copyright (c) 2002 Sean M. Burke. All rights reserved.
79 This library is free software; you can redistribute it and/or modify it
80 under the same terms as Perl itself.
82 This program is distributed in the hope that it will be useful, but
83 without any warranty; without even the implied warranty of
84 merchantability or fitness for a particular purpose.
88 Sean M. Burke C<sburke@cpan.org>