| Handel documentation | Contained in the Handel distribution. |
Handel::Storage::DBIC::Cart - Default storage configuration for Handel::Cart
package Handel::Cart;
use strict;
use warnings;
use base qw/Handel::Base/;
__PACKAGE__->storage_class('Handel::Storage::DBIC::Cart');
Handel::Storage::DBIC::Cart is a subclass of Handel::Storage::DBIC that contains all of the default settings used by Handel::Cart.
Christopher H. Laco
CPAN ID: CLACO
claco@chrislaco.com
http://today.icantfocus.com/blog/
| Handel documentation | Contained in the Handel distribution. |
# $Id$ package Handel::Storage::DBIC::Cart; use strict; use warnings; BEGIN { use base qw/Handel::Storage::DBIC/; use Handel::Constants qw/CART_TYPE_TEMP/; use Handel::Constraints qw/:all/; }; __PACKAGE__->setup({ schema_class => 'Handel::Cart::Schema', schema_source => 'Carts', item_storage_class => 'Handel::Storage::DBIC::Cart::Item', constraints => { id => {'Check Id' => \&constraint_uuid}, shopper => {'Check Shopper' => \&constraint_uuid}, type => {'Check Type' => \&constraint_cart_type}, name => {'Check Name' => \&constraint_cart_name} }, default_values => { id => sub {__PACKAGE__->new_uuid(shift)}, type => CART_TYPE_TEMP } }); 1; __END__