Why is `$@` untrustworthy?

后端 未结 3 1511
悲&欢浪女
悲&欢浪女 2021-01-02 02:27

I seem to recall that it is not safe to trust the value of $@ after an eval. Something about a signal handler having a chance to set $@

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-02 03:17

    The Try::Tiny docs have a pretty good list of eval/$@ shortcomings. I think you might be refering to the Localizing $@ silently masks errors section in there.

提交回复
热议问题