| 1 | ### Data::Quantity::Finance::Currency provides currency-appropriate formatting for numbers | ||
| 2 | |||
| 3 | ### Copyright 1997, 1998 Evolution Online Systems, Inc. | ||
| 4 | # You may use this software for free under the terms of the Artistic License | ||
| 5 | |||
| 6 | ### Change History | ||
| 7 | # 2002-01-21 Simon: Removed bogus dependency on Err::Debug. | ||
| 8 | # 1999-08-02 Simon: Revived; moved to Data::Quantity:: package space. | ||
| 9 | # 1998-07-17 Simon: Refactored; added support for non-decimal display. | ||
| 10 | # 1998-04-18 Jeremy: Added POD. | ||
| 11 | # 1998-03-24 Del: Corrected typos; most functions are not methods. | ||
| 12 | # 1998-03-17 Del: Corrected typo in method call. | ||
| 13 | # 1997-11-17 Simon: Preliminary revised version. | ||
| 14 | |||
| 15 | package Data::Quantity::Finance::Currency; | ||
| 16 | |||
| 17 | require 5; | ||
| 18 | use strict; | ||
| 19 | use Carp; | ||
| 20 | |||
| 21 | use vars qw( $VERSION ); | ||
| 22 | $VERSION = 0.001; | ||
| 23 | |||
| 24 | use Data::Quantity::Number::Number '-isasubclass'; | ||
| 25 | |||
| 26 | use Class::MakeMethods ( | ||
| 27 | 'Template::ClassName:subclass_name --require' => 'type', | ||
| 28 | 'Standard::Global:scalar' => 'default_type', | ||
| 29 | 'Standard::Inheritable:scalar' => 'scale', | ||
| 30 | ); | ||
| 31 | |||
| 32 | ### Package Configuration | ||
| 33 | |||
| 34 | Data::Quantity::Finance::Currency->default_type( Data::Quantity::Finance::Currency->type('USD') ); | ||
| 35 | |||
| 36 | 1; | ||
| 37 | |||
| 38 | __END__ |