start page | rating of books | rating of authors | reviews | copyrights

Programming Perl

Programming PerlSearch this book
Previous: 7.2.49 POSIX - Perl Interface to IEEE Std 1003.1 Chapter 7
The Standard Perl Library
Next: 7.2.51 Safe - Create Safe Namespaces for Evaluating Perl Code
 

7.2.50 Pod::Text - Convert POD Data to Formatted ASCII Text

use Pod::Text;  pod2text("perlfunc.pod", *

filehandle

);  # send formatted output to file $text = pod2text("perlfunc.pod");       # assign formatted output to $text

Pod::Text converts documentation in the POD format (such as can be found throughout the Perl distribution) into formatted ASCII text. Termcap is optionally supported for boldface/underline, and can be enabled with:

$Pod::Text::termcap=1

If termcap is not enabled, backspaces are used to simulate bold and underlined text.

The pod2text() subroutine can take one or two arguments. The first is the name of a file to read the POD from, or "<&STDIN" to read from STDIN . The second argument, if provided, is a filehandle glob where output should be sent. (Use *STDOUT to write to STDOUT .)

A separate pod2text program is included as part of the standard Perl distribution. Primarily, a wrapper for Pod::Text, it can be invoked this way:

pod2text < input.pod


Previous: 7.2.49 POSIX - Perl Interface to IEEE Std 1003.1 Programming Perl Next: 7.2.51 Safe - Create Safe Namespaces for Evaluating Perl Code
7.2.49 POSIX - Perl Interface to IEEE Std 1003.1 Book Index 7.2.51 Safe - Create Safe Namespaces for Evaluating Perl Code