$c->stash->{payments} = [ map { { is_due => $this->is_due( $c, $_ ), cancel_url => $c->uri_for_action( '/payment/cancel', [ $_->id ] ), detail_url => $c->uri_for_action( '/payment/view', [ $_->id ] ), payment_method => $this->payment_method_descr_for( $c, $_->payment_method_id ), # how about the original object ? payment => $_, # or payment_id => $_->id, payment_quantity => $_->quantity, # .... } } @payments ];