Manual Pages for UNIX Darwin command on man IO::Pager
MyWebUniversity

Manual Pages for UNIX Darwin command on man IO::Pager

IO::Pager(3) User Contributed Perl Documentation IO::Pager(3)

NAME

IO::Pager - Select a pager, optionally pipe it output if destination is

a TTY

SYNOPSIS

#Select a pager, sets $ENV{PAGER}

use IO::Pager;

#Optionally pipe output

{

#local $STDOUT = IO::Pager::open *STDOUT;

local $STDOUT = new IO::Pager *STDOUT;

print <<" HEREDOC" ; ... A bunch of text later HEREDOC }

DESCRIPTION

IO::Pager is lightweight and can be used to locate an available pager

and set $ENV{PAGER} (see "NOTES") or as a factory for creating objects

defined elsewhere such as IO::Pager::Buffered and

IO::Pager::Unbuffered.

IO::Pager subclasses are designed to programmatically decide whether or

not to pipe a filehandle's output to a program specified in

$ENV{PAGER}. Subclasses are only required to support filehandle output

methods and close, namely CLOSE Supports close() of the filehandle. PRINT Supports print() to the filehandle. PRINTF Supports printf() to the filehandle. WRITE Supports syswrite() to the filehandle. For anything else, YMMV. nneeww(( [[FFIILLEEHHAANNDDLLEE]],, [[EEXXPPRR]] ))

Instantiate a new IO::Pager to paginate FILEHANDLE if necessary.

Assign the return value to a scoped variable. See the appropriate subclass for implementation specific details. FILEHANDLE

Defaults to currently select()-ed FILEHANDLE.

EXPR An expression which evaluates to the subclass of object to create.

Defaults to IO::Pager::Unbuffered.

ooppeenn(( [[FFIILLEEHHAANNDDLLEE]],, [[EEXXPPRR]] )) An alias for new. cclloossee(( FFIILLEEHHAANNDDLLEE )) Explicitly close the filehandle, this stops any redirection of output on FILEHANDLE that may have been warranted. Normally you'd just wait for the object to pass out of scope. This does not default to the current filehandle. See the appropriate subclass for implementation specific details. ENVIRONMENT PAGER The location of the default pager. PATH If PAGER does not specify an absolute path for the binary PATH may be used.

See "NOTES" for more information.

FILES

IO::Pager may fall back to these binaries in order if $ENV{PAGER} is

not executable. /usr/local/bin/less /usr/bin/less /usr/bin/more

See "NOTES" for more information.

NNOOTTEESS The algorythm for determining which pager is to use as follows:

1. Defer to $ENV{PAGER}

Use the value of $ENV{PAGER} if it exists unless File::Which is

available and the pager in $ENV{PAGER} is determined to be

unavailable. 2. Usual suspects Try the standard, hardcoded paths in "FILES". 3. File::Which If File::Which is available check for "less" and more. 4. more

Set $ENV{PAGER} to "more"

Steps 1, 3 and 4 rely upon $ENV{PATH}.

SEE ALSO

IO::Pager::Buffered, IO::Pager::Unbuffered, IO::Pager::Page

IO::Page, Tool::Less AUTHOR Jerrad Pierce This module is forked from IO::Page 0.02 by Monte Mitzelfelt LLIICCEENNSSEE +o Thou shalt not claim ownership of unmodified materials. +o Thou shalt not claim whole ownership of modified materials. +o Thou shalt grant the indemnity of the provider of materials. +o Thou shalt use and dispense freely without other restrictions.

perl v5.8.8 2005-09-21 IO::Pager(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™