- or download this
sub checkout_total {
+shift->items->get_column("cost")->sum;
}
- or download this
# Inside My::Schema::Cart or an auxillary class only
# loaded into the space on demand.
...
my $sum = $cost_col->sum;
return $sum;
}
- or download this
# This is not exactly how it would be set up for real.
# Load order and @INC stuff requires some tweaks to
...
item:4 --> $ 6.72
item:5 --> $15.50
item:6 --> $63.42