SchemaR/currency/pair.pm

filter: Statementstmt 100% 4 / 4 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 100% 4 / 4 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« SchemaR/currency/code.pm ↑ Summary Schemas/Currency.pm »
1 package Sah::SchemaR::currency::pair;
2  
3 1 our $DATE = '2020-03-08'; # DATE
4 1 our $VERSION = '0.008'; # VERSION
5  
6 1 our $rschema = ["str",[{description=>"\nCurrency pair is string in the form of *currency1*/*currency2*, where\n*currency1* is called the base currency while *currency2* is the quote (or\nprice) currency. Both must be known currency codes (e.g. USD, or IDR).\n\nCurrency code is checked against <pm:Locale::Codes::Currency_Codes>.\n\nWill be normalized to uppercase.\n\n",examples=>[{valid=>0,value=>""},{valid=>0,value=>"idr"},{valid=>1,validated_value=>"USD/IDR",value=>"usd/idr"},{valid=>0,value=>"usd idr"},{valid=>0,value=>"usd/foo"}],match=>qr(\A\S+/\S+\z),summary=>"Fiat currency pair, e.g. USD/IDR","x.perl.coerce_rules"=>["From_str::to_currency_pair"]}],["str"]];
7  
8 1 1;
9 # ABSTRACT: Fiat currency pair, e.g. USD/IDR
10  
11 __END__
« SchemaR/currency/code.pm ↑ Summary Schemas/Currency.pm »