diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-04 16:21:55 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-04 16:21:55 +0000 |
commit | b903fcffa3593f7d54952287ec6b5f0de94b0e94 (patch) | |
tree | e74d6ffe05033efad2e415d2e4632f4dbb786c8e /ext/Sys | |
parent | c406fbf4b2c59f9bf85533351a960a83d25ff7c2 (diff) | |
download | perl-b903fcffa3593f7d54952287ec6b5f0de94b0e94.tar.gz |
The .pm changes to go with #10428.
p4raw-id: //depot/perl@10431
Diffstat (limited to 'ext/Sys')
-rw-r--r-- | ext/Sys/Syslog/Syslog.pm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ext/Sys/Syslog/Syslog.pm b/ext/Sys/Syslog/Syslog.pm index 9c05dcd1f5..eabf7b4dac 100644 --- a/ext/Sys/Syslog/Syslog.pm +++ b/ext/Sys/Syslog/Syslog.pm @@ -7,7 +7,7 @@ use Carp; @ISA = qw(Exporter DynaLoader); @EXPORT = qw(openlog closelog setlogmask syslog); @EXPORT_OK = qw(setlogsock); -$VERSION = '0.01'; +$VERSION = '0.02'; use Socket; use Sys::Hostname; @@ -119,6 +119,8 @@ E<lt>F<Tim.Bunce@ig.co.uk>E<gt> and the perl5-porters mailing list. Dependency on F<syslog.ph> replaced with XS code by Tom Hughes E<lt>F<tom@compton.nu>E<gt>. +Code for constant()s regenerated by Nicholas Clark E<lt>nick@ccl4.orgE<gt>. + =cut sub AUTOLOAD { @@ -128,10 +130,10 @@ sub AUTOLOAD { my $constname; our $AUTOLOAD; ($constname = $AUTOLOAD) =~ s/.*:://; - croak "& not defined" if $constname eq 'constant'; - my $val = constant($constname); - if ($! != 0) { - croak "Your vendor has not defined Sys::Syslog macro $constname"; + croak "&Sys::Syslog::constant not defined" if $constname eq 'constant'; + my ($error, $val) = constant($constname); + if ($error) { + croak $error; } *$AUTOLOAD = sub { $val }; goto &$AUTOLOAD; |