是否有更短的语法或运算符
defined $functionpointer ? $functionpointer->($value) : $value
我想像//那样的运算符,所以我可以很快写出来
$functionpointer //->() $value
或者那个方向的任何东西
我不想做的是写一个额外的方法,重载运算符等
解决方法
不,没有.不过,有关于介绍它的讨论:
What operator should p5p use for safe dereferencing在PerlMonks.