line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Business::Monzo::Currency; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Business::Monzo::Currency |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
A role containing currency attributes / methods |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
10
|
|
|
10
|
|
5840
|
use strict; |
|
10
|
|
|
|
|
29
|
|
|
10
|
|
|
|
|
381
|
|
14
|
10
|
|
|
10
|
|
116
|
use warnings; |
|
10
|
|
|
|
|
33
|
|
|
10
|
|
|
|
|
599
|
|
15
|
|
|
|
|
|
|
|
16
|
10
|
|
|
10
|
|
69
|
use Moo::Role; |
|
10
|
|
|
|
|
27
|
|
|
10
|
|
|
|
|
115
|
|
17
|
10
|
|
|
10
|
|
5094
|
use Types::Standard qw/ :all /; |
|
10
|
|
|
|
|
35
|
|
|
10
|
|
|
|
|
208
|
|
18
|
10
|
|
|
10
|
|
580645
|
use Data::Currency; |
|
10
|
|
|
|
|
673969
|
|
|
10
|
|
|
|
|
1599
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has [ qw/ currency local_currency / ] => ( |
21
|
|
|
|
|
|
|
is => 'ro', |
22
|
|
|
|
|
|
|
isa => Maybe[InstanceOf['Data::Currency']], |
23
|
|
|
|
|
|
|
coerce => sub { |
24
|
|
|
|
|
|
|
my ( $args ) = @_; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
return undef if ! $args; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
if ( ! ref( $args ) ) { |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
$args = Data::Currency->new({ |
31
|
|
|
|
|
|
|
code => $args, |
32
|
|
|
|
|
|
|
}); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
return $args; |
36
|
|
|
|
|
|
|
}, |
37
|
|
|
|
|
|
|
); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 AUTHOR |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Lee Johnson - C<leejo@cpan.org> |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify it under |
44
|
|
|
|
|
|
|
the same terms as Perl itself. If you would like to contribute documentation, |
45
|
|
|
|
|
|
|
features, bug fixes, or anything else then please raise an issue / pull request: |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
https://github.com/leejo/business-monzo |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=cut |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
# vim: ts=4:sw=4:et |