Skip Menu |

This queue is for tickets about the Safe-Isa CPAN distribution.

Report information
The Basics
Id: 127926
Status: new
Priority: 0/
Queue: Safe-Isa

People
Owner: Nobody in particular
Requestors: rrwo [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [WISHLIST] $_call_chain method
Date: Wed, 5 Dec 2018 15:53:15 +0000
To: bug-Safe-Isa [...] rt.cpan.org
From: Robert Rothenberg <rrwo [...] cpan.org>
It would be nice to have a $_call_cahain method that chains methods without arguments, e.g. $obj->foo->bar->baz could be written as $obj->$_call_chain( qw[ foo bar baz ] ); and implemented something like our $_call_chain = sub { my $this = shift; while (my $method = shift) { $this = $this->$_call_if_can($method) // return; } return $this; }; Note above has v5.10 syntax.