Skip to content

Commit

Permalink
v0.08
Browse files Browse the repository at this point in the history
  • Loading branch information
freyfogle committed Dec 23, 2018
1 parent df22cad commit 174ed49
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
5 changes: 5 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Revision history for Data-MoneyCurrency

0.08 Sun Dec 23 10:56:29 CET 2018
use Cpanel::JSON::XS rathr than JSON
new ruby-money conf
changed Author in pod

0.07 Sa 17 Nov 2018 16:19:26 CET
new ruby-money conf to get new currency for Venezuala

Expand Down
5 changes: 2 additions & 3 deletions dist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
; http://dzil.org/

name = Data-MoneyCurrency
version = 0.07
version = 0.08
author = edf <[email protected]>
license = Perl_5
copyright_holder = Opencage Data Limited

; http://dzil.org/tutorial/prereq.html
[Prereqs]
perl = 5.012
JSON = 0
JSON::XS = 0
Cpanel::JSON::XS = 0
File::ShareDir = 0
Pod::Coverage = 0
Test::Exception = 0
Expand Down
10 changes: 6 additions & 4 deletions lib/Data/MoneyCurrency.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,23 @@ our @ISA = qw(Exporter);
our @EXPORT_OK = qw(get_currency get_currencies_for_country);

use File::ShareDir qw(dist_file);
use JSON qw(decode_json);
use Cpanel::JSON::XS;
use Types::Serialiser;
use Carp;
use Data::Dumper;
$Data::Dumper::Sortkeys = 1;

my $rh_currency_for_country = {};

=encoding utf8
=head1 VERSION
Version 0.07
Version 0.08
=cut

our $VERSION = '0.07';
our $VERSION = '0.08';

=head1 SYNOPSIS
Expand Down Expand Up @@ -112,7 +113,8 @@ sub get_currency {
my $rv = {};
for my $key (keys %{ $rh_currency_iso->{$currency_abbreviation} }) {
my $value = $rh_currency_iso->{$currency_abbreviation}{$key};
if (JSON::is_bool($value) or Types::Serialiser::is_bool($value)) {
if (Cpanel::JSON::XS::is_bool($value)
or Types::Serialiser::is_bool($value)) {
$value = $value ? 1 : 0;
}
$rv->{$key} = $value;
Expand Down

0 comments on commit 174ed49

Please sign in to comment.