App::bif::Pager - pipe output to a system (text) pager
0.1.5_8 (yyyy-mm-dd)
use App::bif::Pager; my $pager = App::bif::Pager->new; print "This text goes to a pager\n"; undef $pager; print "This text goes to STDOUT\n";
App::bif::Pager opens a connection to a system pager and makes it the default filehandle so that by default any print statements are sent there.
When the pager object goes out of scope the previous default filehandle is selected again.
The new()
constuctor takes the following arguments.
auto => 1
auto
to a false value to inhibit this behaviour.encoding => ':utf8'
pager => undef
fh
pid
orig_fh
close
open
IO::Pager - does something similar by mucking directly with STDOUT in a way that breaks fork/exec, and I couldn't for the life of me decipher the code style enough to fix it.
Mark Lawrence <nomad@null.net>
Copyright 2014-2017 Mark Lawrence <nomad@null.net>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.