Subject: | autodie does not trap errors in <> operator |
Date: | Thu, 02 Feb 2012 11:05:04 +1100 |
To: | bug-autodie [...] rt.cpan.org |
From: | "Keith.Owens" <Keith.Owens [...] dodo.com.au> |
autodie does not catch errors in the implicit open done by the <> operator.
# perl -e 'use autodie qw(open); <>; print("did not autodie!\n");' foo
Can't open foo: No such file or directory at -e line 1.
did not autodie!
An explicit open with an error is caught.
# perl -e 'use autodie qw(open); open(FH, "foo"); print("did not autodie!\n");'
Can't open 'foo' for reading: 'No such file or directory' at -e line 1
Ubuntu 10.10, perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi, 2.6.35-32-server #64-Ubuntu SMP Tue Jan 3 02:11:24 UTC 2012 x86_64 GNU/Linux, perl-modules 5.10.1-12ubuntu2.1