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'