"Fossies" - the Fresh Open Source Software Archive

Member "install-tl-20200916/tlpkg/tlperl/lib/Pod/Perldoc/ToRtf.pm" (8 Mar 2018, 2149 Bytes) of package /windows/misc/install-tl.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 package Pod::Perldoc::ToRtf;
    2 use strict;
    3 use warnings;
    4 use parent qw( Pod::Simple::RTF );
    5 
    6 use vars qw($VERSION);
    7 $VERSION = '3.28';
    8 
    9 sub is_pageable        { 0 }
   10 sub write_with_binmode { 0 }
   11 sub output_extension   { 'rtf' }
   12 
   13 sub page_for_perldoc {
   14   my($self, $tempfile, $perldoc) = @_;
   15   return unless $perldoc->IS_MSWin32;
   16 
   17   my $rtf_pager = $ENV{'RTFREADER'} || 'write.exe';
   18 
   19   $perldoc->aside( "About to launch <\"$rtf_pager\" \"$tempfile\">\n" );
   20 
   21   return 1 if system( qq{"$rtf_pager"}, qq{"$tempfile"} ) == 0;
   22   return 0;
   23 }
   24 
   25 1;
   26 __END__
   27 
   28 =head1 NAME
   29 
   30 Pod::Perldoc::ToRtf - let Perldoc render Pod as RTF
   31 
   32 =head1 SYNOPSIS
   33 
   34   perldoc -o rtf Some::Modulename
   35 
   36 =head1 DESCRIPTION
   37 
   38 This is a "plug-in" class that allows Perldoc to use
   39 Pod::Simple::RTF as a formatter class.
   40 
   41 This is actually a Pod::Simple::RTF subclass, and inherits
   42 all its options.
   43 
   44 You have to have Pod::Simple::RTF installed (from the Pod::Simple dist),
   45 or this module won't work.
   46 
   47 If Perldoc is running under MSWin and uses this class as a formatter,
   48 the output will be opened with F<write.exe> or whatever program is
   49 specified in the environment variable C<RTFREADER>. For example, to
   50 specify that RTF files should be opened the same as they are when you
   51 double-click them, you would do C<set RTFREADER=start.exe> in your
   52 F<autoexec.bat>.
   53 
   54 Handy tip: put C<set PERLDOC=-ortf> in your F<autoexec.bat>
   55 and that will set this class as the default formatter to run when
   56 you do C<perldoc whatever>.
   57 
   58 =head1 SEE ALSO
   59 
   60 L<Pod::Simple::RTF>, L<Pod::Simple>, L<Pod::Perldoc>
   61 
   62 =head1 COPYRIGHT AND DISCLAIMERS
   63 
   64 Copyright (c) 2002 Sean M. Burke.  All rights reserved.
   65 
   66 This library is free software; you can redistribute it and/or modify it
   67 under the same terms as Perl itself.
   68 
   69 This program is distributed in the hope that it will be useful, but
   70 without any warranty; without even the implied warranty of
   71 merchantability or fitness for a particular purpose.
   72 
   73 =head1 AUTHOR
   74 
   75 Current maintainer: Mark Allen C<< <mallen@cpan.org> >>
   76 
   77 Past contributions from:
   78 brian d foy C<< <bdfoy@cpan.org> >>
   79 Adriano R. Ferreira C<< <ferreira@cpan.org> >>,
   80 Sean M. Burke C<< <sburke@cpan.org> >>
   81 
   82 =cut
   83