Subject: | Failure with autodie |
This module works with everything I've thrown at it ... except autodie.
That is, this code:
#! /usr/bin/env perl
use strict;
use warnings;
use autodie;
open(IN, "foo");
close(IN);
produces (as expected):
Can't open 'foo' for reading: 'No such file or directory' at ex.pl
line 7
whereas this code:
#! /usr/bin/env perl
use strict;
use warnings;
use Ex;
open(IN, "foo");
close(IN);
along with this module Ex.pm:
package Ex;
use Import::Into;
use Module::Runtime qw< use_module >;
sub import
{
use_module('autodie')->import::into(scalar caller);
}
1;
produces instead:
Can't use string ("IN") as a symbol ref while "strict refs" in use
at (eval 21) line 41.
Sort of like if a 'use bareword::filehandles' had snuck in there.
Am I doing something wrong, or is autodie just special somehow?
Perl version, if it matters:
This is perl 5, version 14, subversion 2 (v5.14.2) built for
x86_64-linux