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

后端 未结 4 747
天涯浪人
天涯浪人 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:22

    Using eval on X11 function might still failed to keep alive.

    The code is like

    eval {    
        @win_arrays = GetWindowsFromPid($pid);
    };
    

    The script will be exited from

    X Error of failed request: ...

提交回复
热议问题