Perl 中的面向对象异常处理值得吗? [英] Is object oriented exception handling in Perl worth it?

查看:18
本文介绍了Perl 中的面向对象异常处理值得吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近阅读了Perl 中的面向对象异常处理" Perl.com 文章.在 Perl 中使用异常有什么意义吗?

I recently read "Object Oriented Exception Handling in Perl" Perl.com article. Is there any point to use exceptions in Perl?

推荐答案

我应该注意到你引用的文章是旧的,你现在应该使用 Exception::Class 而不是 Error.pm,后者很古怪且容易出错(这就是我所说的黑魔法").我应该注意,我现在是 Error.pm 的维护者,但我不再推荐它或将它用于我自己的代码.

I should note that the article you referenced is old, and that you should now use Exception::Class instead of Error.pm, which is quirky and tends to break (it's what I call "black magick"). I should note that I am now the Error.pm maintainer, but I no longer recommend it or make use of it for my own code.

这篇关于Perl 中的面向对象异常处理值得吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆