sub total_all_orders { my $self = shift; my $total = 0; $total += $order->total foreach $self->orders; return $total; } #### package Null::Order; use base 'Null::Object'; sub total { 0 } 1;