• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

lib/Term/Size/H20-Apr-2012-15197

t/H20-Apr-2012-165113

ChangesH A D20-Apr-2012281 107

MANIFESTH A D20-Apr-2012325 2217

META.ymlH A D20-Apr-2012646 2625

Makefile.PLH A D20-Apr-20121.1 KiB4424

READMEH A D20-Apr-20122.4 KiB7958

README

1NAME
2    Term::Size::Any - Retrieve terminal size
3
4SYNOPSIS
5        # the traditional way
6        use Term::Size::Any qw( chars pixels );
7
8        ($columns, $rows) = chars *STDOUT{IO};
9        ($x, $y) = pixels;
10
11DESCRIPTION
12    This is a unified interface to retrieve terminal size. It loads one
13    module of a list of known alternatives, each implementing some way to
14    get the desired terminal information. This loaded module will actually
15    do the job on behalf of `Term::Size::Any'.
16
17    Thus, `Term::Size::Any' depends on the availability of one of these
18    modules:
19
20        Term::Size           (soon to be supported)
21        Term::Size::Perl
22        Term::Size::ReadKey  (soon to be supported)
23        Term::Size::Win32
24
25    This release fallbacks to Term::Size::Win32 if running in Windows 32
26    systems. For other platforms, it uses the first of Term::Size::Perl,
27    Term::Size or Term::Size::ReadKey which loads successfully. (To be
28    honest, I disabled the fallback to Term::Size and Term::Size::ReadKey
29    which are buggy by now.)
30
31  FUNCTIONS
32
33    The traditional interface is by importing functions `chars' and `pixels'
34    into the caller's space.
35
36    chars
37            ($columns, $rows) = chars($h);
38            $columns = chars($h);
39
40        `chars' returns the terminal size in units of characters
41        corresponding to the given filehandle `$h'. If the argument is
42        ommitted, `*STDIN{IO}' is used. In scalar context, it returns the
43        terminal width.
44
45    pixels
46            ($x, $y) = pixels($h);
47            $x = pixels($h);
48
49        `pixels' returns the terminal size in units of pixels corresponding
50        to the given filehandle `$h'. If the argument is ommitted,
51        `*STDIN{IO}' is used. In scalar context, it returns the terminal
52        width.
53
54        Many systems with character-only terminals will return `(0, 0)'.
55
56SEE ALSO
57    It all began with Term::Size by Tim Goodwin. You may want to have a look
58    at:
59
60        Term::Size
61        Term::Size::Perl
62        Term::Size::Win32
63        Term::Size::ReadKey
64
65BUGS
66    Please reports bugs via CPAN RT, via web
67    http://rt.cpan.org/NoAuth/Bugs.html?Dist=Term-Size-Any or e-mail to
68    bug-Term-Size-Any@rt.cpan.org.
69
70AUTHOR
71    Adriano R. Ferreira, <ferreira@cpan.org>
72
73COPYRIGHT AND LICENSE
74    Copyright (C) 2008-2012 by Adriano R. Ferreira
75
76    This library is free software; you can redistribute it and/or modify it
77    under the same terms as Perl itself.
78
79