Basket::Calc - Basket/Cart calculation library with support for currency conversion, discounts and tax
version 0.5
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;
Please report any bugs or feature requests on GitHub's issue tracker https://github.com/nupfel/Basket-Calc/issues.
You can find documentation for this module with the perldoc command.
perldoc Basket::Calc
You can also look for information at:
GitHub repository
https://github.com/nupfel/Basket-Calc
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Basket-Calc
CPAN Ratings
http://cpanratings.perl.org/d/Basket-Calc
Lenz Gschwendtner (@norbu09), for being an awesome mentor and friend.
Tobias Kirschstein <lev@cpan.org>
This software is Copyright (c) 2013 by Tobias Kirschstein.
This is free software, licensed under:
The (three-clause) BSD License
To install Basket::Calc, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Basket::Calc
CPAN shell
perl -MCPAN -e shell install Basket::Calc
For more information on module installation, please visit the detailed CPAN module installation guide.