Acme::Numbers - a fluent numeric interface


    use Acme::Numbers;

    print one."\n";                       # prints 1
    print two.hundred."\n";               # prints 200
    print forty.two."\n";                 # prints 42
    print six.hundred.and.sixty.six."\n"; # prints 666
    print one.million."\n";               # prints 1000000

    print"\n";      # prints 3.14
    print"\n";        # prints 1.02
    print"\n";      # prints 0.05

    print four.pounds."\n";               # prints "4.00"
    print four.pounds.five."\n";          # prints "4.05"
    print four.pounds.fifty."\n";         # prints "4.50"
    print four.pounds.fifty.five."\n";    # prints "4.55"

    print fifty.pence."\n";               # prints "0.50"
    print fifty.five.pence."\n";          # prints "0.55"
    print four.pounds.fifty.pence."\n";   # prints "4.50"
    print four.pounds.and.fifty.p."\n";   # prints "4.50"

    print fifty.cents."\n";               # prints "0.50"
    print fifty.five.cents."\n";          # prints "0.55"
    print four.dollars.fifty.cents."\n";  # prints "4.55"



Inspired by this post

and a burning curiosity. At leats, I hope the burning was curiosity.


By default billion is 10**12 because, dammit, that's right.

If you want it to be an American billion then do

    use Acme::Numbers billion => 10**9;

Setting this automatically changes all the larger numbers (trillion, quadrillion, etc) to match.


You should never really use these methods on the class directly.

All numbers handled by Lingua::EN::Words2Nums are handled by this module.

In addition ...

new <value> <operator>

operator can be 'num', 'and' or 'point'


The name of this object (i.e the method that was originally called).


The current numeric value

handle <Acme::Numbers>

Handle putting these two objects together

concat <value>

Concatenate two things.