NAME

Term::Size::ReadKey - Perl extension for retrieving terminal size (using Term::ReadKey)

SYNOPSIS

use Term::Size::ReadKey;

($columns, $rows) = Term::Size::ReadKey::chars *STDOUT{IO};
($x, $y) = Term::Size::ReadKey::pixels;

DESCRIPTION

Yet another implementation of Term::Size. Now using Term::ReadKey to do the hard work.

FUNCTIONS

chars
($columns, $rows) = chars($h);
$columns = chars($h);

chars returns the terminal size in units of characters corresponding to the given filehandle $h. If the argument is ommitted, *STDIN{IO} is used. In scalar context, it returns the terminal width.

pixels
($x, $y) = pixels($h);
$x = pixels($h);

pixels returns the terminal size in units of pixels corresponding to the given filehandle $h. If the argument is ommitted, *STDIN{IO} is used. In scalar context, it returns the terminal width.

Many systems with character-only terminals will return (0, 0).

SEE ALSO

It all began with Term::Size by Tim Goodwin. You may want to have a look at:

Term::Size
Term::Size::Unix
Term::Size::Win32
Term::Size::Perl

You may as well be interested in what more Term::ReadKey does.

Term::ReadKey

It would be helpful if you send me the Params.pm generated by the probe at build time. Please reports bugs via CPAN RT, http://rt.cpan.org/NoAuth/Bugs.html?Dist=Term-Size-ReadKey

AUTHOR

A. R. Ferreira, <ferreira@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2006 by A. R. Ferreira

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.