forked from billward/number-format-perl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
107 lines (73 loc) · 3.74 KB
/
README
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
100
101
102
103
104
105
106
107
Number::Format - Convert numbers to strings with pretty formatting
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.).
ALSO AVAILABLE
The following are also available as part of the number-format
Sourceforge project:
- Template Toolkit users: Use Template::Plugin::Number::Format
(contributed by Darren Chamberlain) from your templates.
- JavaScript users: we also have a JavaScript translation of the
Number::Format done by Cees Hek. Find that in our CVS repository
here: http://number-format.cvs.sourceforge.net/number-format/javascript
HOW TO GET
Download it from your favorite CPAN mirror, or from the Sourceforge
project:
http://sourceforge.net/projects/number-format/
If you are interested in being a developer for this project, or for
more information, please contact William R. Ward, [email protected]
(remove "SPAM" before sending email, leaving only my initials).
BUILDING/INSTALLING
Perl version 5.8 or higher is required, though it may work on older
versions if you edit the 'require 5.008' line. This package is set up
to configure and build like a typical Perl extension. To build:
perl Makefile.PL
make
make test
make install
NOTE: This installs the files in your core Perl module area, typically
/usr/local/lib/perl on Unix/Linux and C:\PERL\LIB on Windows, so you
may need super-user (root/administrator) access to install. If you
wish to install in a private area, such as your home directory,
specify that as "perl Makefile.PL PREFIX=/path/to/private/area" and it
will be installed there instead.
PROBLEMS/BUG REPORTS
Please submit your issues via the CPAN RT bug tracker or the
Sourceforge bug system:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Number-Format
http://sourceforge.net/tracker/?group_id=175334
Please check for existing bug reports on your issue in both places
before filing a new bug.
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.sourceforge.net/mailman/listinfo/number-format-announce
We also have a mailing list for developers which you may join if you
are interested in contributing to the project:
https://lists.sourceforge.net/lists/listinfo/number-format-developers
We do not yet have any list for users of the module; if you would like
one, let us know and we will look into it.
There are also forums available on the SourceForge site:
http://sourceforge.net/forum/?group_id=175334
CREDITS AND LICENSES
This package is copyright 1997-2008 by William R. Ward et al., and may
be distributed under the same terms as cover Perl itself (your choice
of Artistic or GPL). See http://dev.perl.org/licenses/ for more
information.
CHANGES
See the file "CHANGES" for a description of the changes with each
version of Number::Format. You can also browse the CVS history on
SourceForge for full details.