1*0Sstevel@tonic-gate 2*0Sstevel@tonic-gaterequire 5; 3*0Sstevel@tonic-gatepackage Pod::Perldoc::ToText; 4*0Sstevel@tonic-gateuse strict; 5*0Sstevel@tonic-gateuse warnings; 6*0Sstevel@tonic-gate 7*0Sstevel@tonic-gateuse base qw(Pod::Perldoc::BaseTo); 8*0Sstevel@tonic-gate 9*0Sstevel@tonic-gatesub is_pageable { 1 } 10*0Sstevel@tonic-gatesub write_with_binmode { 0 } 11*0Sstevel@tonic-gatesub output_extension { 'txt' } 12*0Sstevel@tonic-gate 13*0Sstevel@tonic-gateuse Pod::Text (); 14*0Sstevel@tonic-gate 15*0Sstevel@tonic-gatesub alt { shift->_perldoc_elem('alt' , @_) } 16*0Sstevel@tonic-gatesub indent { shift->_perldoc_elem('indent' , @_) } 17*0Sstevel@tonic-gatesub loose { shift->_perldoc_elem('loose' , @_) } 18*0Sstevel@tonic-gatesub quotes { shift->_perldoc_elem('quotes' , @_) } 19*0Sstevel@tonic-gatesub sentence { shift->_perldoc_elem('sentence', @_) } 20*0Sstevel@tonic-gatesub width { shift->_perldoc_elem('width' , @_) } 21*0Sstevel@tonic-gate 22*0Sstevel@tonic-gatesub new { return bless {}, ref($_[0]) || $_[0] } 23*0Sstevel@tonic-gate 24*0Sstevel@tonic-gatesub parse_from_file { 25*0Sstevel@tonic-gate my $self = shift; 26*0Sstevel@tonic-gate 27*0Sstevel@tonic-gate my @options = 28*0Sstevel@tonic-gate map {; $_, $self->{$_} } 29*0Sstevel@tonic-gate grep !m/^_/s, 30*0Sstevel@tonic-gate keys %$self 31*0Sstevel@tonic-gate ; 32*0Sstevel@tonic-gate 33*0Sstevel@tonic-gate defined(&Pod::Perldoc::DEBUG) 34*0Sstevel@tonic-gate and Pod::Perldoc::DEBUG() 35*0Sstevel@tonic-gate and print "About to call new Pod::Text ", 36*0Sstevel@tonic-gate $Pod::Text::VERSION ? "(v$Pod::Text::VERSION) " : '', 37*0Sstevel@tonic-gate "with options: ", 38*0Sstevel@tonic-gate @options ? "[@options]" : "(nil)", "\n"; 39*0Sstevel@tonic-gate ; 40*0Sstevel@tonic-gate 41*0Sstevel@tonic-gate Pod::Text->new(@options)->parse_from_file(@_); 42*0Sstevel@tonic-gate} 43*0Sstevel@tonic-gate 44*0Sstevel@tonic-gate1; 45*0Sstevel@tonic-gate 46*0Sstevel@tonic-gate=head1 NAME 47*0Sstevel@tonic-gate 48*0Sstevel@tonic-gatePod::Perldoc::ToText - let Perldoc render Pod as plaintext 49*0Sstevel@tonic-gate 50*0Sstevel@tonic-gate=head1 SYNOPSIS 51*0Sstevel@tonic-gate 52*0Sstevel@tonic-gate perldoc -o text Some::Modulename 53*0Sstevel@tonic-gate 54*0Sstevel@tonic-gate=head1 DESCRIPTION 55*0Sstevel@tonic-gate 56*0Sstevel@tonic-gateThis is a "plug-in" class that allows Perldoc to use 57*0Sstevel@tonic-gatePod::Text as a formatter class. 58*0Sstevel@tonic-gate 59*0Sstevel@tonic-gateIt supports the following options, which are explained in 60*0Sstevel@tonic-gateL<Pod::Text>: alt, indent, loose, quotes, sentence, width 61*0Sstevel@tonic-gate 62*0Sstevel@tonic-gateFor example: 63*0Sstevel@tonic-gate 64*0Sstevel@tonic-gate perldoc -o text -w indent:5 Some::Modulename 65*0Sstevel@tonic-gate 66*0Sstevel@tonic-gate=head1 CAVEAT 67*0Sstevel@tonic-gate 68*0Sstevel@tonic-gateThis module may change to use a different text formatter class in the 69*0Sstevel@tonic-gatefuture, and this may change what options are supported. 70*0Sstevel@tonic-gate 71*0Sstevel@tonic-gate=head1 SEE ALSO 72*0Sstevel@tonic-gate 73*0Sstevel@tonic-gateL<Pod::Text>, L<Pod::Perldoc> 74*0Sstevel@tonic-gate 75*0Sstevel@tonic-gate=head1 COPYRIGHT AND DISCLAIMERS 76*0Sstevel@tonic-gate 77*0Sstevel@tonic-gateCopyright (c) 2002 Sean M. Burke. All rights reserved. 78*0Sstevel@tonic-gate 79*0Sstevel@tonic-gateThis library is free software; you can redistribute it and/or modify it 80*0Sstevel@tonic-gateunder the same terms as Perl itself. 81*0Sstevel@tonic-gate 82*0Sstevel@tonic-gateThis program is distributed in the hope that it will be useful, but 83*0Sstevel@tonic-gatewithout any warranty; without even the implied warranty of 84*0Sstevel@tonic-gatemerchantability or fitness for a particular purpose. 85*0Sstevel@tonic-gate 86*0Sstevel@tonic-gate=head1 AUTHOR 87*0Sstevel@tonic-gate 88*0Sstevel@tonic-gateSean M. Burke C<sburke@cpan.org> 89*0Sstevel@tonic-gate 90*0Sstevel@tonic-gate=cut 91*0Sstevel@tonic-gate 92