58 lines
1.1 KiB
Perl
58 lines
1.1 KiB
Perl
package WebGUI::Shop::ShipDriver;
|
|
|
|
use strict;
|
|
|
|
use Class::InsideOut qw{ :std };
|
|
use Carp qw(croak);
|
|
|
|
=head1 NAME
|
|
|
|
Package WebGUI::Shop::ShipDriver
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
This package manages tax information, and calculates taxes on a shopping cart. It isn't a classic object
|
|
in that the only data it contains is a WebGUI::Session object, but it does provide several methods for
|
|
handling the information in the tax tables.
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
use WebGUI::Shop::ShipDriver;
|
|
|
|
my $tax = WebGUI::Shop::ShipDriver->new($session);
|
|
|
|
=head1 METHODS
|
|
|
|
These subroutines are available from this package:
|
|
|
|
=cut
|
|
|
|
readonly session => my %session;
|
|
|
|
#-------------------------------------------------------------------
|
|
|
|
=head2 new ( $session )
|
|
|
|
Constructor for the WebGUI::Shop::Tax. Returns a WebGUI::Shop::Tax object.
|
|
|
|
=cut
|
|
|
|
sub new {
|
|
my $class = shift;
|
|
my $session = shift;
|
|
my $self = {};
|
|
bless $self, $class;
|
|
register $self;
|
|
$session{ id $self } = $session;
|
|
return $self;
|
|
}
|
|
|
|
#-------------------------------------------------------------------
|
|
|
|
=head2 session ( )
|
|
|
|
Accessor for the session object. Returns the session object.
|
|
|
|
=cut
|
|
|
|
1;
|