NAME

Basket::Calc - Basket/Cart calculation library with support for currency conversion, discounts and tax

VERSION

version 0.5

SYNOPSIS

Quick summary of what the module does.

Perhaps a little code snippet.

use Basket::Calc;
use Data::Dump 'dump';

my $basket = Basket::Calc->new(debug => 1, currency => 'NZD', tax => .15);
$basket->add_item({ price => 14.90, currency => 'USD', quantity => 2 });
$basket->add_item({ price => 59, currency => 'EUR'});
$basket->add_item({ price => 119.15, currency => 'JPY' });

$basket->add_discount({ type => 'percent', value => .2 });
# or
$basket->add_discount({ type => 'amount', value => 15, currency => 'HKD' });

print dump $basket->calculate;

ATTRIBUTES

debug

currency

tax

SUBROUTINES/METHODS

add_item

add_discount

calculate

BUGS

Please report any bugs or feature requests on GitHub's issue tracker https://github.com/nupfel/Basket-Calc/issues.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Basket::Calc

You can also look for information at:

ACKNOWLEDGEMENTS

  • Lenz Gschwendtner (@norbu09), for being an awesome mentor and friend.

AUTHOR

Tobias Kirschstein <lev@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2013 by Tobias Kirschstein.

This is free software, licensed under:

The (three-clause) BSD License