in reply to Re: Error handling in chained method calls
in thread Error handling in chained method calls
I'm not sure if it's worth it, but by applying Attribute::Handlers on safecall it could even be possible to run some checks at compile time.
Maybe its better to rename $safecall to $CHAIN or $_chain to make the syntax "sweeter" and make conflicts unlikely if the $ is missing.
$obj->$CHAIN( meth1=>[1,2,3] , meth2=>[3,4,5] );
Cheers Rolf
UPDATE: it should even be possible to add a method safecall to UNIVERSAL, to avoid always putting the $ in front, but I'm a little reluctant because of possible side effects.
|
|---|