为什么在 Perl 中不推荐使用 Switch 模块?

问题描述:

为什么 Switch 模块 已在 Perl 5.12 中弃用?

我知道 switch/case 是用 elsif 制作的,但我不太喜欢那样.

I know that a switch/case be made with elsif, but I don't like that very much.

Perl 5.10 引入了一个真正的开关称为 given-when

Perl 5.10 introduced a real switch called given-when

旧的 Switch 使用了 源过滤和其他限制.

The old Switch used source filtering and had other limitations.