What are the common pitfalls when using Perl's eval?

后端 未结 4 816
天涯浪人
天涯浪人 2021-02-04 06:54

What are the common pitfalls associated with Perl\'s eval, which might make you choose to use a module such as Try::Tiny?

4条回答
  •  眼角桃花
    2021-02-04 07:01

    The issues are explained in the Try::Tiny documentation. Briefly, they are:

    • Clobbering $@
    • Localizing $@ silently masks errors
    • $@ might not be a true value

提交回复
热议问题