summaryrefslogtreecommitdiff
path: root/ext/DB_File
diff options
context:
space:
mode:
Diffstat (limited to 'ext/DB_File')
-rw-r--r--ext/DB_File/DB_File.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm
index 7dd1d26360..90a82b8fca 100644
--- a/ext/DB_File/DB_File.pm
+++ b/ext/DB_File/DB_File.pm
@@ -15,6 +15,7 @@ require 5.003 ;
use strict;
use Carp;
+use Errno;
require Tie::Hash;
@DB_File::HASHINFO::ISA = qw(Tie::Hash);
@@ -196,7 +197,7 @@ sub AUTOLOAD {
($constname = $AUTOLOAD) =~ s/.*:://;
my $val = constant($constname, @_ ? $_[0] : 0);
if ($! != 0) {
- if ($! =~ /Invalid/) {
+ if ($!{EINVAL} || $! =~ /Invalid/) {
$AutoLoader::AUTOLOAD = $AUTOLOAD;
goto &AutoLoader::AUTOLOAD;
}