| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  |  | 
| 2 |  |  |  |  |  |  | package UR::Object::Type::AccessorWriter::Product; | 
| 3 |  |  |  |  |  |  |  | 
| 4 | 1 |  |  | 1 |  | 46 | use strict; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 29 |  | 
| 5 | 1 |  |  | 1 |  | 3 | use warnings; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 100 |  | 
| 6 |  |  |  |  |  |  | require UR; | 
| 7 |  |  |  |  |  |  | our $VERSION = "0.46"; # UR $VERSION; | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | sub calculate { | 
| 10 | 1 |  |  | 1 | 0 | 1 | my $self = shift; | 
| 11 | 1 |  |  |  |  | 2 | my $object = shift; | 
| 12 | 1 |  |  |  |  | 1 | my $properties = shift; | 
| 13 | 1 |  |  |  |  | 1 | my $total = 1; | 
| 14 | 1 |  |  |  |  | 2 | for my $property (@$properties) { | 
| 15 | 2 |  |  |  |  | 5 | $total *= $object->$property | 
| 16 |  |  |  |  |  |  | } | 
| 17 | 1 |  |  |  |  | 3 | return $total; | 
| 18 |  |  |  |  |  |  | }; | 
| 19 |  |  |  |  |  |  |  | 
| 20 |  |  |  |  |  |  | 1; | 
| 21 |  |  |  |  |  |  |  | 
| 22 |  |  |  |  |  |  | =pod | 
| 23 |  |  |  |  |  |  |  | 
| 24 |  |  |  |  |  |  | =head1 NAME | 
| 25 |  |  |  |  |  |  |  | 
| 26 |  |  |  |  |  |  | UR::Object::Type::AccessorWriter::Product - Implements a calculation accessor which multiplies the values of its properties | 
| 27 |  |  |  |  |  |  |  | 
| 28 |  |  |  |  |  |  | =cut |