什么版本的 Perl 引入了词法 my 子程序?

What version of Perl introduced lexical my subroutines?

根据 this bug report 我的模块之一在旧版 Perls 上生成此错误,

Experimental "my" subs not enabled at <file.pm> ...

我也应该设置什么最低 perl 版本?

来自perldoc perlexperiment

Lexical subroutines

  • Introduced in Perl 5.18.0
  • Accepted in Perl 5.26.0