Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jk2addict (4946)

  (email not shown publicly)
AOL IM: chrislaco (Add Buddy, Send Message)
Yahoo! ID: (Add User, Send Message)

Journal of jk2addict (4946)

Thursday February 08, 2007
02:01 PM


[ #32355 ]

Handel has Handel::Currency, which takes care of exposing formatting/conversion using the various Locale::Currency/Format things, as well as Finance::Currency::Convert::WebserviceX (or any other conversion class you want to glue in).

Handel and Mango expose H::C objects from when inflating/deflating certain columns in the DB schema, columns like price, subtotal, total, etc.

This stuff is generic enough that I feel the urge to split it out into CPAN stuffs. Much like DBICs InflateColumn::DateTime component that auto inflates data/time fields from the DB, I want to create an InflateColumn::Currency component to do the same. That's the easy part really.

The other half is that having IC::Currency require Handel just for Handel::Currency is silly, so it needs split out into its own CPAN module.

The question is, what should it be called? The only thing that stands out to me is Data::Currency, just like we have Data::UUID, Data::Integer etc. Does that sound sane?

I know we have a Math::Currency, but that's just a little shy of my needs, but it does have some good knowledge about currency math issues. At some point, Data::Currency should subclass it, or at least use/learn from it.


The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Plan approved.

    Attack at once.
    • Bombs away! Should be on CPAN shortly, with tests even.

      ---------------------------- ------ ------ ------ ------ ------ ------ ------
      File                           stmt   bran   cond    sub    pod   time  total
      ---------------------------- ------ ------ ------ ------ ------ ------ ------
      blib/lib/Data/     100.0  100.0  100.0  100.0  100.0

  • Might be a more specific namespace, since everything is Data.

    J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers