Subject: | Undefined subroutine Module::xxx when xxx exists in the CORE namespace |
Here is a simple examle which works good without autodie and dies with
message "Undefined subroutine &Config::Simpliest::read called" when
using autodie:
package main;
my $cfg = Config::Simpliest::read("/tmp/t.txt");
package Config::Simpliest;
use strict;
use autodie;
sub read {
my $fname = shift;
open my $fh, $fname;
my %cfg;
while (<$fh>) {
chomp;
my ($k, $v) = split /\s*=\s*/;
$cfg{$k} = $v;
}
close $fh;
return \%cfg;
}