| Handel documentation | Contained in the Handel distribution. |
Handel::Storage::DBIC::Order::Item - Default storage configuration for Handel::Order::Item
package Handel::Order::Item;
use strict;
use warnings;
use base qw/Handel::Base/;
__PACKAGE__->storage_class('Handel::Storage::DBIC::Order::Item');
Handel::Storage::DBIC::Order::Item is a subclass of Handel::Storage::DBIC that contains all of the default settings used by Handel::Order::Item.
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::Order::Item; use strict; use warnings; BEGIN { use base qw/Handel::Storage::DBIC/; use Handel::Constraints qw/:all/; }; __PACKAGE__->setup({ schema_class => 'Handel::Order::Schema', schema_source => 'Items', currency_columns => [qw/price total/], constraints => { quantity => {'Check Quantity' => \&constraint_quantity}, price => {'Check Price' => \&constraint_price}, total => {'Check Total' => \&constraint_price}, id => {'Check Id' => \&constraint_uuid}, orderid => {'Check Order Id' => \&constraint_uuid} }, default_values => { id => sub {__PACKAGE__->new_uuid(shift)}, price => 0, quantity => 1, total => 0 } }); 1; __END__