File: README

package info (click to toggle)
libnumber-format-perl 1.45-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 140 kB
  • ctags: 13
  • sloc: perl: 309; makefile: 48
file content (99 lines) | stat: -rw-r--r-- 3,261 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
Number::Format - Convert numbers to strings with pretty formatting

Version: 1.45

WHAT IS IT

Number::Format is a library for formatting numbers.  Functions are
provided for converting numbers to strings in a variety of ways, and to
convert strings that contain numbers back into numeric form.  The output
formats may include thousands separators - characters inserted between
each group of three characters counting right to left from the decimal
point.  The characters used for the decimal point and the thousands
separator come from the locale information or can be specified by the
user.

Also of note is the format_picture command which converts a number into
a string using a "picture" string that you provide.  This is similar to
the PRINT USING statement that some versions of BASIC have.

In addition, functions exist to generate strings for numbers
containing currency (e.g. "USD 9.99", "DEM 20.00", etc.) or for
rounding large values of bytes to the nearest giga/mega/kilo
(e.g. "1.5M", "640K", etc.).


HOW TO GET

Download it from your favorite CPAN mirror, or from our website:

    http://www.bayview.com/software/perl.shtml


BUILDING/INSTALLING

Perl version 5.004 or higher is recommended, though it should work on
5.003.  This package is set up to configure and build like a typical
Perl extension.  To build:

        perl Makefile.PL
        make && make test && make install
        make install

NOTE: You may need super-user access to install.


PROBLEMS/BUG REPORTS

Please send any reports of problems or bugs to wrw@bayview.com.  If
you can include a patch, it'll increase the chances that the bug will
be fixed quickly :-)


MAILING LIST

We have an electronic mailing list for announcements of new releases
of this module.  If you wish to join this list, visit this URL:

   http://lists.bayview.com/listinfo/number-format-announce

There is not currently a discussion list, but I'll be happy to create
one if there is demand for it.  (Yes, I know that Mailman is written
in Python, but it's the best mailing list software I know of.)


CREDITS AND LICENSES

This package is copyright 1997-2002 by William R. Ward <wrw@bayview.com>
and may be distributed under terms of the Artistic License used to cover
Perl itself.  See the file Artistic in the distribution of Perl 5.002 or
later for details of copy and distribution terms.


CHANGE HISTORY

Changes for version 1.45 (Aug 27, 2002)
------------------------

  - Now that the Euro is used in Germany, the regression tests (which
    expected DEM as the currency) fail.  Change tests to accept either
    DEM or EUR for the currency code.  Also change tabs to spaces in
    Format.pm.

Changes for version 1.44 (Dec 11, 2001)
------------------------

  - Fix bug in format_number caused by the fact that under Perl 5.6,
    the string representation of a number respects the decimal point
    defined by the locale.

Changes for version 1.43 (Dec 10, 2001)
------------------------

  - Fix bug in format_price that caused an extra space to be inserted
    in some situations, and no space in others, between the currency
    string and the number.
  - Add support for gigabytes (formerly only kilo and mega) to
    format_bytes.

[See the file "CHANGES" for previous changes.]