perl的autodie.pm中的错误?

Pet*_*rch 29 perl

我期待着:

#!/usr/bin/perl
use autodie;
# autodie in effect here
{
    no autodie;
    # autodie is not in effect here
}
# autodie should be in effect here because of the supposedly lexical scope
# of autodie, but this doesn't die:
open my $i, '<', '/nonexistent';
Run Code Online (Sandbox Code Playgroud)

我的基础是perldoc autodie:

"autodie"编译指示具有词法范围,这意味着使用"autodie"更改的函数和子例程只会更改其行为,直到封闭块,文件或"eval"结束

此外,{ no autodie }(在范围内)甚至是概要的一部分

use/no warnings 表现得像我期望的那样:

#!/usr/bin/perl
use warnings;
{
    no warnings;
}
# This *does* generate a warning
print undef;
Run Code Online (Sandbox Code Playgroud)

我错过了什么或者您是否同意autodie中的错误?我没有在autodie buglist中找到任何东西

This is perl, v5.10.1 (*) built for i486-linux-gnu-thread-multi
Run Code Online (Sandbox Code Playgroud)

编辑:我现在提交了一份错误报告

Lin*_*een 9

我可以使用v5.10.0(Debian x86_64)和ActiveState 5.14.2重现这一点.

尝试使用此位置进行错误报告.

编辑我测试了一些:为了解决问题,直到修复bug,你需要use再次自动修改:

use strict;
use autodie;

do {
    no autodie;
    # ...
} while(0);

use autodie;

open FILE, '<', '/non-existing'; # dies again.
Run Code Online (Sandbox Code Playgroud)