ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

For more information about the manual page format, see the manual page for manpages(5).



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



NAME
       IO::Pager::Buffered - Pipe deferred output to a pager if output is to a TTY

SYNOPSIS
         use IO::Pager::Buffered;
         {
           #local $STDOUT =     IO::Pager::Buffered::open *STDOUT;
           local  $STDOUT = new IO::Pager::Buffered       *STDOUT;
           print <<"  HEREDOC" ;
           ...
           A bunch of text later
           HEREDOC
         }

DESCRIPTION
       IO::Pager is designed to programmaticly decide whether or not to point the STDOUT file handle into a
       pipe to program specified in $ENV{PAGER} or one of a standard list of pagers.

       This subclass buffers all output for display upon exiting the current scope.  If this is not what you
       want look at another subclass such as IO::Pager::Unbuffered. While probably not common, this may be
       useful in some cases,such as buffering all output to STDOUT while the process occurs, showing only
       warnings on STDERR, then displaying the output to STDOUT after.  Or alternately letting output to
       STDERR slide by and defer warnings for later perusal.

       new( [FILEHANDLE] )

       Instantiate a new IO::Pager to paginate FILEHANDLE if necessary.  Assign the return value to a scoped
       variable. Output does not occur until all references to this variable are destroyed eg; upon leaving
       the current scope. See "DESCRIPTION".

       FILEHANDLE
           Defaults to currently select()-ed FILEHANDLE.

       open( [FILEHANDLE] )

       An alias for new.

       close( FILEHANDLE )

       Explicitly close the filehandle, this stops collecting and displays the output, executing a pager if
       necessary. Normally you'd just wait for the object to pass out of scope.

       This does not default to the current filehandle.

CAVEATS
       If you mix buffered and unbuffered operations the output order is unspecified, and will probably
       differ for a TTY vs. a file. See perlfunc.

       $, is used see perlvar.

SEE ALSO
       IO::Pager, IO::Pager::Unbuffered, IO::Pager::Page

AUTHOR
       Jerrad Pierce <jpierce@cpan.org>

       This module is forked from IO::Page 0.02 by Monte Mitzelfelt

LICENSE
          Thou shalt not claim ownership of unmodified materials.

          Thou shalt not claim whole ownership of modified materials.

          Thou shalt grant the indemnity of the provider of materials.

          Thou shalt use and dispense freely without other restrictions.



perl v5.8.8                                      2004-11-17                           IO::Pager::Buffered(3)

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.