base work for ShipperDriver module with tests
This commit is contained in:
parent
dff8f24ea9
commit
995ae35bb0
2 changed files with 146 additions and 0 deletions
58
lib/WebGUI/Shop/ShipperDriver.pm
Normal file
58
lib/WebGUI/Shop/ShipperDriver.pm
Normal 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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue