Mojolicious::Plugin::Human - Helpers to print values as human readable form.
$self->plugin('Human', { # Set money parameters if you need money_delim => ",", money_digit => " ", # Or change date and time strings datetime => '%d.%m.%Y %H:%M', time => '%H:%M:%S', date => '%d.%m.%Y', phone_country => 1, phone_region => 123, });
You can use this module in Mojo template engine to make you users happy.
Set format for human readable delimiter of money. Default: <.>
Set format for human readable digits of money. Default: <,>
Set format for human readable date and time. Default: %F %H:%M
Set format for human readable time. Default: %H:%M:%S
Set format for human readable date. Default: %F
Set country code for phones functions. Default: 7
Set region code for phones functions. Default: 495
Get string, return timestamp
Get string, return formatted string
Get string, return date and time string in human readable form.
Get string, return time string in human readable form.
Get string, return date string in human readable form.
Get number, return money string in human readable form with levels.
Get srtring, return phones (if many) string in human readable form.
Get srtring, return just numbers phone string without country code.
Get word base form and add some of suffix ($one, $two, $many) depends of $count
Clear phones. Fix first local digit 8 problem.
Return <undef> if phome not correct
Make phone string in human readable form.
Get a string and return DateTime or undef. Have a hack for parse Russian data and time.
Dmitry E. Oboukhov <unera@debian.org>, Roman V. Nikolaev <rshadow@rambler.ru>
Copyright (C) 2011 Dmitry E. Oboukhov <unera@debian.org> Copyright (C) 2011 Roman V. Nikolaev <rshadow@rambler.ru>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install Mojolicious::Plugin::Human, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::Human
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::Human
For more information on module installation, please visit the detailed CPAN module installation guide.