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;