|  line  | 
 stmt  | 
 bran  | 
 cond  | 
 sub  | 
 pod  | 
 time  | 
 code  | 
| 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 package Object::eBay::Currency;  | 
| 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 our $VERSION = '0.5.1';  | 
| 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
4
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
 
 | 
25696
 | 
 use Class::Std; {  | 
| 
 
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
14612
 | 
    | 
| 
 
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
13
 | 
    | 
| 
5
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
 
 | 
187
 | 
     use warnings;  | 
| 
 
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
4
 | 
    | 
| 
 
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
73
 | 
    | 
| 
6
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
 
 | 
13
 | 
     use strict;  | 
| 
 
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
7
 | 
    | 
| 
 
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
105
 | 
    | 
| 
7
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
 
 | 
11
 | 
     use Carp;  | 
| 
 
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
22
 | 
    | 
| 
 
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
551
 | 
    | 
| 
8
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     my %value_for       :ATTR( :get       );  | 
| 
10
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     my %currency_id_for :ATTR( :get );  | 
| 
11
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     sub BUILD {  | 
| 
13
 | 
3
 | 
 
 | 
 
 | 
  
3
  
 | 
  
0
  
 | 
1131
 | 
         my ($self, $ident, $args_ref) = @_;  | 
| 
14
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
8
 | 
         my $details = $args_ref->{object_details};  | 
| 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
16
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
4
 | 
         my $msg = "Missing 'content' and/or 'currencyID'\n";  | 
| 
17
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
8
 | 
         my $content = $details->{content};  | 
| 
18
 | 
3
 | 
 
 | 
 
 | 
 
 | 
 
 | 
5
 | 
         my $id = $details->{currencyID};  | 
| 
19
 | 
3
 | 
  
100
  
 | 
  
 66
  
 | 
 
 | 
 
 | 
165
 | 
         croak $msg if !defined($content) || !defined($id);  | 
| 
20
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
21
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
9
 | 
         $value_for{$ident}       = $details->{content};  | 
| 
22
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
8
 | 
         $currency_id_for{$ident} = $details->{currencyID};  | 
| 
23
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
24
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
25
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     sub as_string :STRINGIFY {  | 
| 
26
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
  
1
  
 | 
186
 | 
         my ($self) = @_;  | 
| 
27
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
8
 | 
         return $self->get_currency_id() . sprintf('%.2f', $self->get_value());  | 
| 
28
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
 
 | 
14
 | 
     }  | 
| 
 
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
3
 | 
    | 
| 
 
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
12
 | 
    | 
| 
29
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
30
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     # aliases providing naming similar to other Object::eBay classes  | 
| 
31
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
  
1
  
 | 
431
 | 
     sub value       :NUMERIFY { $_[0]->get_value()       }  | 
| 
 
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
 
 | 
3
 | 
    | 
| 
 
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
9
 | 
    | 
| 
 
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1824
 | 
    | 
| 
32
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
  
1
  
 | 
400
 | 
     sub as_bool     :BOOLIFY  { $_[0]->get_value() != 0  }  | 
| 
 
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
 
 | 
3
 | 
    | 
| 
 
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
16
 | 
    | 
| 
 
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1037
 | 
    | 
| 
33
 | 
0
 | 
 
 | 
 
 | 
  
0
  
 | 
  
1
  
 | 
 
 | 
     sub currency_id           { $_[0]->get_currency_id() }  | 
| 
34
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
35
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
36
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 1;  | 
| 
37
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
38
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 __END__  |