Hmm, now that I come back to look at it with fresh mind, it occurs to me that I led me reduce abstraction ad absurdum the moment I used eval (which, for non-Perl folks, means the same here as try in other languages) – and I might as well have written

my $name = eval { $product->offering->merchant->name };

To keep with reduce, it would have to be something like $a && $a->$b() as the reduce block.

Reply

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
11 + 9 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.