1898184e3Ssthenpackage Pod::Perldoc::ToNroff; 2898184e3Ssthenuse strict; 3898184e3Ssthenuse warnings; 4898184e3Ssthenuse parent qw(Pod::Perldoc::BaseTo); 5898184e3Ssthen 6898184e3Ssthenuse vars qw($VERSION); 7*9f11ffb7Safresh1$VERSION = '3.28'; 8898184e3Ssthen 9898184e3Ssthen# This is unlike ToMan.pm in that it emits the raw nroff source! 10898184e3Ssthen 11898184e3Ssthensub is_pageable { 1 } # well, if you ask for it... 12898184e3Ssthensub write_with_binmode { 0 } 13898184e3Ssthensub output_extension { 'man' } 14898184e3Ssthen 15898184e3Ssthenuse Pod::Man (); 16898184e3Ssthen 17898184e3Ssthensub center { shift->_perldoc_elem('center' , @_) } 18898184e3Ssthensub date { shift->_perldoc_elem('date' , @_) } 19898184e3Ssthensub fixed { shift->_perldoc_elem('fixed' , @_) } 20898184e3Ssthensub fixedbold { shift->_perldoc_elem('fixedbold' , @_) } 21898184e3Ssthensub fixeditalic { shift->_perldoc_elem('fixeditalic' , @_) } 22898184e3Ssthensub fixedbolditalic { shift->_perldoc_elem('fixedbolditalic', @_) } 23898184e3Ssthensub quotes { shift->_perldoc_elem('quotes' , @_) } 24898184e3Ssthensub release { shift->_perldoc_elem('release' , @_) } 25898184e3Ssthensub section { shift->_perldoc_elem('section' , @_) } 26898184e3Ssthen 27898184e3Ssthensub new { return bless {}, ref($_[0]) || $_[0] } 28898184e3Ssthen 29898184e3Ssthensub parse_from_file { 30898184e3Ssthen my $self = shift; 31898184e3Ssthen my $file = $_[0]; 32898184e3Ssthen 33898184e3Ssthen my @options = 34898184e3Ssthen map {; $_, $self->{$_} } 35898184e3Ssthen grep !m/^_/s, 36898184e3Ssthen keys %$self 37898184e3Ssthen ; 38898184e3Ssthen 39898184e3Ssthen defined(&Pod::Perldoc::DEBUG) 40898184e3Ssthen and Pod::Perldoc::DEBUG() 41898184e3Ssthen and print "About to call new Pod::Man ", 42898184e3Ssthen $Pod::Man::VERSION ? "(v$Pod::Man::VERSION) " : '', 43898184e3Ssthen "with options: ", 44898184e3Ssthen @options ? "[@options]" : "(nil)", "\n"; 45898184e3Ssthen ; 46898184e3Ssthen 47898184e3Ssthen Pod::Man->new(@options)->parse_from_file(@_); 48898184e3Ssthen} 49898184e3Ssthen 50898184e3Ssthen1; 51898184e3Ssthen__END__ 52898184e3Ssthen 53898184e3Ssthen=head1 NAME 54898184e3Ssthen 55898184e3SsthenPod::Perldoc::ToNroff - let Perldoc convert Pod to nroff 56898184e3Ssthen 57898184e3Ssthen=head1 SYNOPSIS 58898184e3Ssthen 59898184e3Ssthen perldoc -o nroff -d something.3 Some::Modulename 60898184e3Ssthen 61898184e3Ssthen=head1 DESCRIPTION 62898184e3Ssthen 63898184e3SsthenThis is a "plug-in" class that allows Perldoc to use 64898184e3SsthenPod::Man as a formatter class. 65898184e3Ssthen 66898184e3SsthenThe following options are supported: center, date, fixed, fixedbold, 67898184e3Ssthenfixeditalic, fixedbolditalic, quotes, release, section 68898184e3Ssthen 69898184e3SsthenThose options are explained in L<Pod::Man>. 70898184e3Ssthen 71898184e3SsthenFor example: 72898184e3Ssthen 73898184e3Ssthen perldoc -o nroff -w center:Pod -d something.3 Some::Modulename 74898184e3Ssthen 75898184e3Ssthen=head1 CAVEAT 76898184e3Ssthen 77898184e3SsthenThis module may change to use a different pod-to-nroff formatter class 78898184e3Ssthenin the future, and this may change what options are supported. 79898184e3Ssthen 80898184e3Ssthen=head1 SEE ALSO 81898184e3Ssthen 82898184e3SsthenL<Pod::Man>, L<Pod::Perldoc>, L<Pod::Perldoc::ToMan> 83898184e3Ssthen 84898184e3Ssthen=head1 COPYRIGHT AND DISCLAIMERS 85898184e3Ssthen 86898184e3SsthenCopyright (c) 2002 Sean M. Burke. All rights reserved. 87898184e3Ssthen 88898184e3SsthenThis library is free software; you can redistribute it and/or modify it 89898184e3Ssthenunder the same terms as Perl itself. 90898184e3Ssthen 91898184e3SsthenThis program is distributed in the hope that it will be useful, but 92898184e3Ssthenwithout any warranty; without even the implied warranty of 93898184e3Ssthenmerchantability or fitness for a particular purpose. 94898184e3Ssthen 95898184e3Ssthen=head1 AUTHOR 96898184e3Ssthen 97898184e3SsthenCurrent maintainer: Mark Allen C<< <mallen@cpan.org> >> 98898184e3Ssthen 99898184e3SsthenPast contributions from: 100898184e3Ssthenbrian d foy C<< <bdfoy@cpan.org> >> 101898184e3SsthenAdriano R. Ferreira C<< <ferreira@cpan.org> >>, 102898184e3SsthenSean M. Burke C<< <sburke@cpan.org> >> 103898184e3Ssthen 104898184e3Ssthen=cut 105898184e3Ssthen 106