SHARYANTO::Number::Util - Number utilities
This document describes version 0.59 of SHARYANTO::Number::Util (from Perl distribution SHARYANTO-Number-Util), released on 2014-05-05.
Format $num using metric prefix, e.g.:
$num
format_metric(14 , {base=>10}); # => "14" format_metric(12000 , {base=> 2, precision=>1}); # => "11.7K" format_metric(12000 , {base=>10, precision=>1}); # => "11.7Ki" format_metric(-0.0017, {base=>10}); # => "1.7m"
Known options:
base => INT (either 2 or 10, default: 2)
precision => INT
i_mark => BOOL (default: 1)
Give "i" suffix to prefixes when in base 10 for K, M, G, T, and so on.
SHARYANTO
Number formatting routines: Number::Format, Format::Human::Bytes, Number::Bytes::Human.
https://en.wikipedia.org/wiki/Metric_prefix
Please visit the project's homepage at https://metacpan.org/release/SHARYANTO-Number-Util.
Source repository is at https://github.com/sharyanto/perl-SHARYANTO-Number-Util.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=SHARYANTO-Number-Util
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Steven Haryanto <stevenharyanto@gmail.com>
This software is copyright (c) 2014 by Steven Haryanto.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install SHARYANTO::Number::Util, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SHARYANTO::Number::Util
CPAN shell
perl -MCPAN -e shell install SHARYANTO::Number::Util
For more information on module installation, please visit the detailed CPAN module installation guide.