summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-19 17:15:34 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-19 17:15:34 +0000
commit93014de6975a5818b25c37acbc52a655889dc308 (patch)
tree47175ca71e31e279d0e65773e1ebeff492007ac1 /ext
parente1f775196788199aa205bfd047e37a8e188e06b2 (diff)
downloadperl-93014de6975a5818b25c37acbc52a655889dc308.tar.gz
avoid failing on $!{ENOTHERE} (they can always use C<exists $!{NOTHERE}>
for that) p4raw-id: //depot/perl@5147
Diffstat (limited to 'ext')
-rw-r--r--ext/Errno/Errno_pm.PL14
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 75dacfc0bd..adf8902cc3 100644
--- a/ext/Errno/Errno_pm.PL
+++ b/ext/Errno/Errno_pm.PL
@@ -235,9 +235,8 @@ sub FETCH {
no strict 'refs';
return $! == &$errname;
}
- require Carp;
- Carp::confess("No errno $errname");
-}
+ return "";
+}
sub STORE {
require Carp;
@@ -252,7 +251,6 @@ sub NEXTKEY {
while(($k,$v) = each %Errno::) {
my $proto = prototype("Errno::$k");
last if (defined($proto) && $proto eq "");
-
}
$k
}
@@ -287,8 +285,8 @@ C<Errno> defines and conditionally exports all the error constants
defined in your system C<errno.h> include file. It has a single export
tag, C<:POSIX>, which will export all POSIX defined error numbers.
-C<Errno> also makes C<%!> magic such that each element of C<%!> has a non-zero
-value only if C<$!> is set to that value, eg
+C<Errno> also makes C<%!> magic such that each element of C<%!> has a
+non-zero value only if C<$!> is set to that value, eg
use Errno;
@@ -300,6 +298,10 @@ value only if C<$!> is set to that value, eg
}
}
+If a specified constant C<EFOO> doesn't exist on the system, C<$!{EFOO}>
+has a false value. You may use C<exists $!{EFOO}> to check whether the
+constant is available on the system.
+
=head1 AUTHOR
Graham Barr <gbarr@pobox.com>