]>
Dogcows Code - chaz/homebank2ledger/blob - lib/App/HomeBank2Ledger/Util.pm
64c0cb2ab53fc5d1a5ac6ae2db5bb2aa6314f83c
1 package App
::HomeBank2Ledger
::Util
;
2 # ABSTRACT: Miscellaneous utility functions
7 use Exporter
qw(import);
9 our $VERSION = '0.002'; # VERSION
11 our @EXPORT_OK = qw(commify rtrim);
16 my $comma = shift || ',';
18 my $str = reverse $num;
19 $str =~ s/(\d\d\d)(?=\d)(?!\d*\.)/$1$comma/g;
21 return scalar reverse $str;
41 App::HomeBank2Ledger::Util - Miscellaneous utility functions
51 $commified = commify($num);
52 $commified = commify($num, $comma_char);
54 Just another commify subroutine.
58 $trimmed_str = rtrim($str);
64 Please report any bugs or feature requests on the bugtracker website
65 L<https://github.com/chazmcgarvey/homebank2ledger/issues>
67 When submitting a bug or request, please include a test-file or a
68 patch to an existing test-file that illustrates the bug or desired
73 Charles McGarvey <chazmcgarvey@brokenzipper.com>
75 =head1 COPYRIGHT AND LICENSE
77 This software is Copyright (c) 2019 by Charles McGarvey.
79 This is free software, licensed under:
This page took 0.035075 seconds and 4 git commands to generate.