Name : perl-Array-PrintCols
| |
Version : 2.6
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 6.70
| Date : 2024-08-05 20:39:47
|
Group : Development/Libraries/Perl
| Source RPM : perl-Array-PrintCols-2.6-6.70.src.rpm
|
Size : 0.31 MB
| |
Packager : (none)
| |
Summary : Print or format array elements in vertically sorted columns
|
Description :
This module exports two subroutine names: \'print_cols\' and \'format_cols\'.
The \'print_cols\' subroutine prints the items of \'AATT_array_\' in multiple, alphabetically & vertically sorted columns. In the case of the first argument being a HASH or HASHREF, only the keys of the hash are considered.
One, two, or three optional arguments may be given to \'print_cols\' to control the width and number of the columns, the total width of the output, and indentation. Reasonable defaults apply in the absence of the optional arguments (or when given as the empty string or zero). Generally, the minimum width column is used when possible.
If \'$_colspec_\' is given as a non-negative number, it is treated as the minimum width of the column; the actual width will be the maximum of this value and the lengths of all array items.
If \'$_colspec_\' is given as a negative number, its absolute value value is used to determine the total number of columns. However, it cannot exceed the total number of columns possible based on the maximum length of all the array elements.
If a third argument is supplied, it is used as the total width of the output. The default for this value is the value of the environment variable \'$ENV{\'COLUMNS\'}\', if defined, or 80.
If the fourth argument is given, it is used as the indent for all lines printed, which subtracts from the total width of the output. This value defaults to zero (ie: no indention of the output).
The variable \'$Array::PrintCols::PreSorted\' controls whether or not the \'print_cols\' subroutine will expect its array argument to already be sorted. If this variable is nil or zero, \'print_cols\' will cause print out a sorted _copy_ of the input array.
The routine \'format_cols\' is called exactly like \'print_cols\' but returns the formatted result as a string, rather than printing it. \'print_cols\' actually invokes \'format_cols\', which does the real work.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-A/openSUSE_Tumbleweed/noarch |