Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Handel::Currency 1.00005

    Download button

    No screenshots available
    Downloads: 524  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Christopher H. Laco | More programs
    Perl Artistic License / FREE
    October 1st, 2007, 18:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Handel::Currency description

    Handel::Currency is a price container to do currency conversion/formatting.

    Handel::Currency is a price container to do currency conversion/formatting.

    SYNOPSIS

    use Handel::Currency;

    my $price = Handel::Currency->new(1.2. 'USD');
    print $price; # 1.20 USD
    print $price+1 # 2.2
    print $price->code; # USD
    print $price->format; # FMT_SYMBOL
    print $price->as_string; # 1.20 USD
    print $price->as_string('FMT_SYMBOL'); # $1.20

    print 'Your price in Canadian Dollars is: ';
    print $price->convert('CAD')->value;

    The Handel::Currency module provides basic currency formatting within Handel using Data::Currency. It can be used separately to format any number into a more friendly formatted currency string.

    my $price = 1.23;
    my $currency = Handel::Currency->new($price);

    print $currency->as_string;

    A new Handel::Currency object is automatically returned within the shopping cart when calling subtotal, total, and price as an lvalue:

    my $cart = Handel::Cart->search({id => '11111111-1111-1111-1111-111111111111'});

    print $cart->subtotal; # 12.9
    print $cart->subtotal->as_string; # 12.90 USD

    Each Handel::Currency object will stringify to the original value except in string context, where it stringifies to the format specified in format.

    Requirements:

    · Perl



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    price container | currency conversion | currency formatting | price | container | currency

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM