base work for ShipperDriver module with tests

This commit is contained in:
Colin Kuskie 2008-02-19 04:50:20 +00:00
parent dff8f24ea9
commit 995ae35bb0
2 changed files with 146 additions and 0 deletions

View file

@ -0,0 +1,58 @@
package WebGUI::Shop::ShipperDriver;
use strict;
use Class::InsideOut qw{ :std };
use Carp qw(croak);
=head1 NAME
Package WebGUI::Shop::ShipperDriver
=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::ShipperDriver;
my $tax = WebGUI::Shop::ShipperDriver->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;