Mojolicious::Plugin::Number::Commify - Numbers 1,000,000 times more readable
# Mojolicious $self->plugin('Number::Commify'); # Mojolicious::Lite plugin 'Number::Commify';
Mojolicious::Plugin::Number::Commify is a Mojolicious plugin for putting commas into big numbers. Sometimes this is 1,000,000 times better than letting the reader try to parse it.
The plugin takes an optional 'separator' to use for separating groups of digits. Any length of string can be used, but common choices are dot ('.'), space (' '), underscore ('_') or apostrophe ("'"). If no separator is specified, it defaults to comma (',').
$self->plugin('Number::Commify' => { separator => '.' });
Mojolicious::Plugin::Number::Commify inherits all methods from Mojolicious::Plugin.
$plugin->register(Mojolicious->new);
Register plugin in Mojolicious application.
It's often useful to have access to a commify function in views, so an easily accessible helper is in order.
Copyright (C) Benjamin Goldberg, Nic Sandfield
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.
perlfaq5, Mojolicious::Guides.
To install Mojolicious::Plugin::Number::Commify, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::Number::Commify
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::Number::Commify
For more information on module installation, please visit the detailed CPAN module installation guide.