p4raw-id: //depot/perl@23424
sub EXISTS {
my ($self, $errname) = @_;
- my $proto = prototype($errname);
+ my $r = ref $errname;
+ my $proto = !$r || $r eq 'CODE' ? prototype($errname) : undef;
defined($proto) && $proto eq "";
}
use Errno;
-print "1..5\n";
+print "1..6\n";
print "not " unless @Errno::EXPORT_OK;
print "ok 1\n";
}
print "ok 5\n";
+
+eval { exists $!{[]} };
+print $@ ? "not ok 6\n" : "ok 6\n";