The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

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

VERSION

version 0.1

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;

NAME

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

VERSION

Version 0.1

ATTRIBUTES

debug

currency

tax

SUBROUTINES/METHODS

add_item

add_discount

calculate

AUTHOR

Tobias Kirschstein, <lev at cpan.org>

BUGS

Please report any bugs or feature requests to bug-basket-calc at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Basket-Calc. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

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

    perldoc Basket::Calc

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2013 Tobias Kirschstein.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

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