-
-
01 Feb 2014 10:08:56 UTC
- Distribution: Format-LongNumber
- Module version: 0.02
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (1)
- Testers (507 / 0 / 0)
- Kwalitee
Bus factor: 0- 82.56% Coverage
- License: unknown
- Activity
24 month- Tools
- Download (9.71KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- unknown
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Format::LongNumber - Format long numbers to human readable view.
SYNOPSIS
use Format::LongNumber; my $seconds = 3600*24*3 + 3600*4 + 60*5 + 11; print full_time($seconds); # '3d 4h 5m 11s' my $bytes = 123456789; print full_traffic($bytes); # '117Mb 755Kb 277b' print short_traffic($bytes); # '117.74Mb' # You may create custom formats by functions: # short_value(%grade_table, $value); # full_value(%grade_table, $value); # For example: my %my_time_grade = ( 3600*24 => " day ", 3600 => " hour ", 60 => " min ", 1 => " sec " ); print full_value(\%my_time_grade, 121); # '2 min 1 sec' );
DESCRIPTION
full_value(\%grade_table, $total)
Abstract function of the final value
Params:
%grade_table - hash with dimensions, where the key is a value dimension, and the value is the symbol dimension $total - value to bring us to the desired mean
short_value(\%grade_table, $total)
Converts the given value only to the largest grade-value
AUTHOR
Mikhail N Bogdanov
<mbogdanov at cpan.org>
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 212:
You forgot a '=back' before '=head1'
Module Install Instructions
To install Format::LongNumber, copy and paste the appropriate command in to your terminal.
cpanm Format::LongNumber
perl -MCPAN -e shell install Format::LongNumber
For more information on module installation, please visit the detailed CPAN module installation guide.