require Exporter;
use XSLoader ();
@ISA = qw(Exporter);
-$VERSION = "1.03";
+$VERSION = "1.04";
# Items to export into callers namespace by default
# (move infrequently used names to @EXPORT_OK below)
@EXPORT =
sub AUTOLOAD {
(my $constname = $AUTOLOAD) =~ s/.*:://;
- my $val = constant($constname);
- if ($! != 0) {
- if ($! =~ /Invalid/ || $!{EINVAL}) {
- $AutoLoader::AUTOLOAD = $AUTOLOAD;
- goto &AutoLoader::AUTOLOAD;
- }
- else {
- my ($pack,$file,$line) = caller;
- die "Your vendor has not defined Fcntl macro $constname, used at $file line $line.
-";
- }
+ die "&Fcntl::constant not defined" if $constname eq 'constant';
+ my ($error, $val) = constant($constname);
+ if ($error) {
+ my (undef,$file,$line) = caller;
+ die "$error at $file line $line.\n";
}
*$AUTOLOAD = sub { $val };
goto &$AUTOLOAD;
package Socket;
our($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-$VERSION = "1.72";
+$VERSION = "1.73";
=head1 NAME
sub AUTOLOAD {
my($constname);
($constname = $AUTOLOAD) =~ s/.*:://;
- my $val = constant($constname, @_ ? $_[0] : 0);
- if ($! != 0) {
- my ($pack,$file,$line) = caller;
- croak "Your vendor has not defined Socket macro $constname, used";
+ croak "&Socket::constant not defined" if $constname eq 'constant';
+ my ($error, $val) = constant($constname);
+ if ($error) {
+ croak $error;
}
eval "sub $AUTOLOAD () { $val }";
goto &$AUTOLOAD;
@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;
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 {
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;