summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/Fcntl/Fcntl.pm9
-rw-r--r--ext/Fcntl/Makefile.PL4
-rw-r--r--ext/File-Glob/Glob.pm10
-rw-r--r--ext/File-Glob/Makefile.PL4
-rw-r--r--ext/I18N-Langinfo/Langinfo.pm16
-rw-r--r--ext/I18N-Langinfo/Makefile.PL4
-rw-r--r--ext/POSIX/Makefile.PL4
-rw-r--r--ext/POSIX/lib/POSIX.pm10
-rw-r--r--ext/Socket/Makefile.PL4
-rw-r--r--ext/Socket/Socket.pm9
10 files changed, 19 insertions, 55 deletions
diff --git a/ext/Fcntl/Fcntl.pm b/ext/Fcntl/Fcntl.pm
index 970735cd4e..6e1c1afdcd 100644
--- a/ext/Fcntl/Fcntl.pm
+++ b/ext/Fcntl/Fcntl.pm
@@ -186,14 +186,7 @@ XSLoader::load();
sub AUTOLOAD {
(my $constname = $AUTOLOAD) =~ s/.*:://;
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";
- }
- no strict 'refs';
- *$AUTOLOAD = sub { $val };
- goto &$AUTOLOAD;
+ constant($constname);
}
1;
diff --git a/ext/Fcntl/Makefile.PL b/ext/Fcntl/Makefile.PL
index 2bed7547a1..470291ffa3 100644
--- a/ext/Fcntl/Makefile.PL
+++ b/ext/Fcntl/Makefile.PL
@@ -1,5 +1,5 @@
use ExtUtils::MakeMaker;
-use ExtUtils::Constant 0.11 'WriteConstants';
+use ExtUtils::Constant 0.23 'WriteConstants';
WriteMakefile(
NAME => 'Fcntl',
XSPROTOARG => '-noprototypes', # XXX remove later?
@@ -39,7 +39,7 @@ my @names = (qw(
{name=>"SEEK_END", default=>["IV", "2"]},
{name=>"_S_IFMT", macro=>"S_IFMT", value=>"S_IFMT"});
WriteConstants(
- PROXYSUBS => 1,
+ PROXYSUBS => {croak_on_error => 1},
NAME => 'Fcntl',
NAMES => \@names,
);
diff --git a/ext/File-Glob/Glob.pm b/ext/File-Glob/Glob.pm
index 4219c7eb28..acb53d6ff3 100644
--- a/ext/File-Glob/Glob.pm
+++ b/ext/File-Glob/Glob.pm
@@ -37,7 +37,7 @@ use feature 'switch';
@EXPORT_OK = (@{$EXPORT_TAGS{'glob'}}, 'csh_glob');
-$VERSION = '1.09';
+$VERSION = '1.10';
sub import {
require Exporter;
@@ -63,13 +63,7 @@ sub AUTOLOAD {
my $constname;
($constname = $AUTOLOAD) =~ s/.*:://;
- my ($error, $val) = constant($constname);
- if ($error) {
- require Carp;
- Carp::croak($error);
- }
- eval "sub $AUTOLOAD { $val }";
- goto &$AUTOLOAD;
+ constant($constname);
}
XSLoader::load();
diff --git a/ext/File-Glob/Makefile.PL b/ext/File-Glob/Makefile.PL
index 790613bde4..5f2b4f3007 100644
--- a/ext/File-Glob/Makefile.PL
+++ b/ext/File-Glob/Makefile.PL
@@ -1,5 +1,5 @@
use ExtUtils::MakeMaker;
-use ExtUtils::Constant 0.11 'WriteConstants';
+use ExtUtils::Constant 0.23 'WriteConstants';
WriteMakefile(
NAME => 'File::Glob',
VERSION_FROM => 'Glob.pm',
@@ -22,7 +22,7 @@ sub MY::cflags {
}
WriteConstants(
- PROXYSUBS => 1,
+ PROXYSUBS => {croak_on_error => 1},
NAME => 'File::Glob',
NAMES => [qw(GLOB_ABEND GLOB_ALPHASORT GLOB_ALTDIRFUNC GLOB_BRACE GLOB_ERR
GLOB_LIMIT GLOB_MARK GLOB_NOCASE GLOB_NOCHECK GLOB_NOMAGIC
diff --git a/ext/I18N-Langinfo/Langinfo.pm b/ext/I18N-Langinfo/Langinfo.pm
index 51d0d4d5b6..48e44ce201 100644
--- a/ext/I18N-Langinfo/Langinfo.pm
+++ b/ext/I18N-Langinfo/Langinfo.pm
@@ -72,7 +72,7 @@ our @EXPORT_OK = qw(
YESSTR
);
-our $VERSION = '0.06';
+our $VERSION = '0.07';
sub AUTOLOAD {
# This AUTOLOAD is used to 'autoload' constants from the constant()
@@ -82,19 +82,7 @@ sub AUTOLOAD {
our $AUTOLOAD;
($constname = $AUTOLOAD) =~ s/.*:://;
croak "&I18N::Langinfo::constant not defined" if $constname eq 'constant';
- my ($error, $val) = constant($constname);
- if ($error) { croak $error; }
- {
- no strict 'refs';
- # Fixed between 5.005_53 and 5.005_61
-#XXX if ($] >= 5.00561) {
-#XXX *$AUTOLOAD = sub () { $val };
-#XXX }
-#XXX else {
- *$AUTOLOAD = sub { $val };
-#XXX }
- }
- goto &$AUTOLOAD;
+ constant($constname);
}
XSLoader::load();
diff --git a/ext/I18N-Langinfo/Makefile.PL b/ext/I18N-Langinfo/Makefile.PL
index 56c3aeeca0..2cc590afae 100644
--- a/ext/I18N-Langinfo/Makefile.PL
+++ b/ext/I18N-Langinfo/Makefile.PL
@@ -1,5 +1,5 @@
use ExtUtils::MakeMaker;
-use ExtUtils::Constant;
+use ExtUtils::Constant 0.23;
WriteMakefile(
'NAME' => 'I18N::Langinfo',
@@ -30,7 +30,7 @@ push @names, # This lot are only enums for __SVR4_I386_ABI_L1__:
foreach qw (CRNCYSTR THOUSEP RADIXCHAR);
ExtUtils::Constant::WriteConstants(
- PROXYSUBS => 1,
+ PROXYSUBS => {croak_on_error => 1},
NAME => 'I18N::Langinfo',
NAMES => \@names,
);
diff --git a/ext/POSIX/Makefile.PL b/ext/POSIX/Makefile.PL
index 4a2c08a13e..0e994a60a4 100644
--- a/ext/POSIX/Makefile.PL
+++ b/ext/POSIX/Makefile.PL
@@ -1,6 +1,6 @@
# Expect this line to be read by t/posix.t, don't change it
use ExtUtils::MakeMaker;
-use ExtUtils::Constant 0.11 'WriteConstants';
+use ExtUtils::Constant 0.23 'WriteConstants';
use Config;
my $rt_signals;
if ($Config{sig_name} =~ /\bRTMIN\b/ && $Config{sig_name} =~ /\bRTMAX\b/) {
@@ -119,7 +119,7 @@ if ($rt_signals) {
}
WriteConstants(
- PROXYSUBS => 1,
+ PROXYSUBS => {croak_on_error => 1},
NAME => 'POSIX',
NAMES => \@names,
);
diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm
index fbbbcd1627..1071b3b955 100644
--- a/ext/POSIX/lib/POSIX.pm
+++ b/ext/POSIX/lib/POSIX.pm
@@ -4,7 +4,7 @@ use warnings;
our(@ISA, %EXPORT_TAGS, @EXPORT_OK, @EXPORT, $AUTOLOAD, %SIGRT) = ();
-our $VERSION = "1.21";
+our $VERSION = "1.22";
use AutoLoader;
@@ -36,21 +36,15 @@ sub usage;
XSLoader::load();
sub AUTOLOAD {
- no strict;
no warnings 'uninitialized';
if ($AUTOLOAD =~ /::(_?[a-z])/) {
# require AutoLoader;
$AutoLoader::AUTOLOAD = $AUTOLOAD;
goto &AutoLoader::AUTOLOAD
}
- local $! = 0;
my $constname = $AUTOLOAD;
$constname =~ s/.*:://;
- my ($error, $val) = constant($constname);
- croak $error if $error;
- *$AUTOLOAD = sub { $val };
-
- goto &$AUTOLOAD;
+ constant($constname);
}
package POSIX::SigAction;
diff --git a/ext/Socket/Makefile.PL b/ext/Socket/Makefile.PL
index 043f4823cd..d81a5c34cc 100644
--- a/ext/Socket/Makefile.PL
+++ b/ext/Socket/Makefile.PL
@@ -1,5 +1,5 @@
use ExtUtils::MakeMaker;
-use ExtUtils::Constant 0.11 'WriteConstants';
+use ExtUtils::Constant 0.23 'WriteConstants';
use Config;
WriteMakefile(
NAME => 'Socket',
@@ -72,7 +72,7 @@ push @names,
foreach qw(INADDR_ANY INADDR_LOOPBACK INADDR_NONE INADDR_BROADCAST);
WriteConstants(
- PROXYSUBS => 1,
+ PROXYSUBS => {croak_on_error => 1},
NAME => 'Socket',
NAMES => \@names,
);
diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm
index 1cffe6b5df..a46d2fec68 100644
--- a/ext/Socket/Socket.pm
+++ b/ext/Socket/Socket.pm
@@ -1,7 +1,7 @@
package Socket;
our($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-$VERSION = "1.90";
+$VERSION = "1.91";
=head1 NAME
@@ -435,12 +435,7 @@ sub AUTOLOAD {
my($constname);
($constname = $AUTOLOAD) =~ s/.*:://;
croak "&Socket::constant not defined" if $constname eq 'constant';
- my ($error, $val) = constant($constname);
- if ($error) {
- croak $error;
- }
- *$AUTOLOAD = sub { $val };
- goto &$AUTOLOAD;
+ constant($constname);
}
XSLoader::load();