summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1999-11-15 20:50:31 -0500
committerGurusamy Sarathy <gsar@cpan.org>1999-12-03 04:47:03 +0000
commit9426adcd48655815b65cea5a9f1eebbe7e23a9df (patch)
treed9707481a6d1bd26c1d688da99bbd3b0273c0aaa /ext
parent34baa6c30415f54e9b8c2e622de1e229cf36d781 (diff)
downloadperl-9426adcd48655815b65cea5a9f1eebbe7e23a9df.tar.gz
applied suggested patch; removed $VERSION = $VERSION hack
(change#4043 fixed the need for that) Message-Id: <199911160650.BAA18874@monk.mps.ohio-state.edu> Subject: [PATCH 5.005_62] XSLoader.pm p4raw-link: @4043 on //depot/cfgperl: 09bef84370e90d727656ea11ba5ee8be80e361d3 p4raw-id: //depot/perl@4623
Diffstat (limited to 'ext')
-rw-r--r--ext/B/B.pm6
-rw-r--r--ext/ByteLoader/ByteLoader.pm6
-rw-r--r--ext/DB_File/DB_File.pm6
-rw-r--r--ext/Data/Dumper/Dumper.pm8
-rw-r--r--ext/Devel/DProf/DProf.pm6
-rw-r--r--ext/Devel/Peek/Peek.pm8
-rw-r--r--ext/DynaLoader/DynaLoader_pm.PL10
-rw-r--r--ext/DynaLoader/Makefile.PL6
-rw-r--r--ext/DynaLoader/dlutils.c3
-rw-r--r--ext/Fcntl/Fcntl.pm6
-rw-r--r--ext/File/Glob/Glob.pm6
-rw-r--r--ext/GDBM_File/GDBM_File.pm6
-rw-r--r--ext/IO/IO.pm8
-rw-r--r--ext/NDBM_File/NDBM_File.pm6
-rw-r--r--ext/ODBM_File/ODBM_File.pm6
-rw-r--r--ext/Opcode/Opcode.pm6
-rw-r--r--ext/POSIX/POSIX.pm8
-rw-r--r--ext/SDBM_File/SDBM_File.pm6
-rw-r--r--ext/Socket/Socket.pm6
-rw-r--r--ext/Thread/Thread.pm6
-rw-r--r--ext/attrs/attrs.pm7
-rw-r--r--ext/re/re.pm5
22 files changed, 71 insertions, 70 deletions
diff --git a/ext/B/B.pm b/ext/B/B.pm
index 6661ebac93..8c46479c75 100644
--- a/ext/B/B.pm
+++ b/ext/B/B.pm
@@ -6,9 +6,9 @@
# License or the Artistic License, as specified in the README file.
#
package B;
-require DynaLoader;
+use XSLoader ();
require Exporter;
-@ISA = qw(Exporter DynaLoader);
+@ISA = qw(Exporter);
@EXPORT_OK = qw(minus_c ppname
class peekop cast_I32 cstring cchar hash threadsv_names
main_root main_start main_cv svref_2object opnumber amagic_generation
@@ -259,7 +259,7 @@ sub walksymtable {
}
}
-bootstrap B;
+XSLoader::load 'B';
1;
diff --git a/ext/ByteLoader/ByteLoader.pm b/ext/ByteLoader/ByteLoader.pm
index 46870105d8..286d74697e 100644
--- a/ext/ByteLoader/ByteLoader.pm
+++ b/ext/ByteLoader/ByteLoader.pm
@@ -1,12 +1,10 @@
package ByteLoader;
-require DynaLoader;
-
-@ISA = qw(DynaLoader);
+use XSLoader ();
$VERSION = 0.03;
-bootstrap ByteLoader $VERSION;
+XSLoader::load 'ByteLoader', $VERSION;
# Preloaded methods go here.
diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm
index 44bdad61f6..661a523983 100644
--- a/ext/DB_File/DB_File.pm
+++ b/ext/DB_File/DB_File.pm
@@ -155,8 +155,8 @@ $DB_RECNO = new DB_File::RECNOINFO ;
require Tie::Hash;
require Exporter;
use AutoLoader;
-require DynaLoader;
-@ISA = qw(Tie::Hash Exporter DynaLoader);
+use XSLoader ();
+@ISA = qw(Tie::Hash Exporter);
@EXPORT = qw(
$DB_BTREE $DB_HASH $DB_RECNO
@@ -231,7 +231,7 @@ eval {
# };
#}
-bootstrap DB_File $VERSION;
+XSLoader::load 'DB_File', $VERSION;
# Preloaded methods go here. Autoload methods go after __END__, and are
# processed by the autosplit program.
diff --git a/ext/Data/Dumper/Dumper.pm b/ext/Data/Dumper/Dumper.pm
index 44cc613d34..608879cc2f 100644
--- a/ext/Data/Dumper/Dumper.pm
+++ b/ext/Data/Dumper/Dumper.pm
@@ -9,22 +9,22 @@
package Data::Dumper;
-$VERSION = $VERSION = '2.101';
+$VERSION = '2.101';
#$| = 1;
require 5.004_02;
require Exporter;
-require DynaLoader;
+use XSLoader ();
require overload;
use Carp;
-@ISA = qw(Exporter DynaLoader);
+@ISA = qw(Exporter);
@EXPORT = qw(Dumper);
@EXPORT_OK = qw(DumperX);
-bootstrap Data::Dumper;
+XSLoader::load 'Data::Dumper';
# module vars and their defaults
$Indent = 2 unless defined $Indent;
diff --git a/ext/Devel/DProf/DProf.pm b/ext/Devel/DProf/DProf.pm
index 4c43f4d3d5..689692909f 100644
--- a/ext/Devel/DProf/DProf.pm
+++ b/ext/Devel/DProf/DProf.pm
@@ -182,11 +182,11 @@ sub DB {
# print "nonXS DBDB\n";
}
-require DynaLoader;
-@Devel::DProf::ISA = 'DynaLoader';
+use XSLoader ();
+
$Devel::DProf::VERSION = '19990108'; # this version not authorized by
# Dean Roehrich. See "Changes" file.
-bootstrap Devel::DProf $Devel::DProf::VERSION;
+XSLoader::load 'Devel::DProf', $Devel::DProf::VERSION;
1;
diff --git a/ext/Devel/Peek/Peek.pm b/ext/Devel/Peek/Peek.pm
index 2e990b0a3a..4b472ad8a8 100644
--- a/ext/Devel/Peek/Peek.pm
+++ b/ext/Devel/Peek/Peek.pm
@@ -3,17 +3,17 @@
package Devel::Peek;
-$VERSION = $VERSION = 0.95;
+$VERSION = 0.95;
require Exporter;
-require DynaLoader;
+use XSLoader ();
-@ISA = qw(Exporter DynaLoader);
+@ISA = qw(Exporter);
@EXPORT = qw(Dump mstat DeadCode DumpArray DumpWithOP DumpProg);
@EXPORT_OK = qw(SvREFCNT SvREFCNT_inc SvREFCNT_dec);
%EXPORT_TAGS = ('ALL' => [@EXPORT, @EXPORT_OK]);
-bootstrap Devel::Peek;
+XSLoader::load 'Devel::Peek';
sub DumpWithOP ($;$) {
local($Devel::Peek::dump_ops)=1;
diff --git a/ext/DynaLoader/DynaLoader_pm.PL b/ext/DynaLoader/DynaLoader_pm.PL
index a02f5bfae5..5cc5aead11 100644
--- a/ext/DynaLoader/DynaLoader_pm.PL
+++ b/ext/DynaLoader/DynaLoader_pm.PL
@@ -28,7 +28,7 @@ package DynaLoader;
#
# Tim.Bunce@ig.co.uk, August 1994
-$VERSION = $VERSION = "1.03"; # avoid typo warning
+$VERSION = "1.03"; # avoid typo warning
require AutoLoader;
*AUTOLOAD = \&AutoLoader::AUTOLOAD;
@@ -129,6 +129,14 @@ if ($dl_debug) {
sub croak { require Carp; Carp::croak(@_) }
+sub bootstrap_inherit {
+ my $module = $_[0];
+ local *isa = *{"$module\::ISA"};
+ local @isa = (@isa, 'DynaLoader');
+ # Cannot goto due to delocalization. Will report errors on a wrong line?
+ bootstrap(@_);
+}
+
# The bootstrap function cannot be autoloaded (without complications)
# so we define it here:
diff --git a/ext/DynaLoader/Makefile.PL b/ext/DynaLoader/Makefile.PL
index 2141fdeb2f..fa01c355a3 100644
--- a/ext/DynaLoader/Makefile.PL
+++ b/ext/DynaLoader/Makefile.PL
@@ -8,8 +8,10 @@ WriteMakefile(
SKIP => [qw(dynamic dynamic_lib dynamic_bs)],
XSPROTOARG => '-noprototypes', # XXX remove later?
VERSION_FROM => 'DynaLoader_pm.PL',
- PL_FILES => {'DynaLoader_pm.PL'=>'DynaLoader.pm'},
- PM => {'DynaLoader.pm' => '$(INST_LIBDIR)/DynaLoader.pm'},
+ PL_FILES => {'DynaLoader_pm.PL'=>'DynaLoader.pm',
+ 'XSLoader_pm.PL'=>'XSLoader.pm'},
+ PM => {'DynaLoader.pm' => '$(INST_LIBDIR)/DynaLoader.pm',
+ 'XSLoader.pm' => '$(INST_LIBDIR)/XSLoader.pm'},
clean => {FILES => 'DynaLoader.c DynaLoader.xs DynaLoader.pm'},
);
diff --git a/ext/DynaLoader/dlutils.c b/ext/DynaLoader/dlutils.c
index 377d6dd5ad..664e331e7b 100644
--- a/ext/DynaLoader/dlutils.c
+++ b/ext/DynaLoader/dlutils.c
@@ -30,7 +30,8 @@ dl_generic_private_init(pTHXo) /* called by dl_*.xs dl_private_init() */
{
char *perl_dl_nonlazy;
#ifdef DEBUGGING
- dl_debug = SvIV(get_sv("DynaLoader::dl_debug", 0x04) );
+ SV *sv = get_sv("DynaLoader::dl_debug", 0);
+ dl_debug = sv ? SvIV(sv) : 0;
#endif
if ( (perl_dl_nonlazy = getenv("PERL_DL_NONLAZY")) != NULL )
dl_nonlazy = atoi(perl_dl_nonlazy);
diff --git a/ext/Fcntl/Fcntl.pm b/ext/Fcntl/Fcntl.pm
index 44bb0ae0b2..1eb14e9eb2 100644
--- a/ext/Fcntl/Fcntl.pm
+++ b/ext/Fcntl/Fcntl.pm
@@ -45,8 +45,8 @@ what constants are implemented in your system.
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD);
require Exporter;
-require DynaLoader;
-@ISA = qw(Exporter DynaLoader);
+use XSLoader ();
+@ISA = qw(Exporter);
$VERSION = "1.03";
# Items to export into callers namespace by default
# (move infrequently used names to @EXPORT_OK below)
@@ -161,6 +161,6 @@ sub AUTOLOAD {
goto &$AUTOLOAD;
}
-bootstrap Fcntl $VERSION;
+XSLoader::load 'Fcntl', $VERSION;
1;
diff --git a/ext/File/Glob/Glob.pm b/ext/File/Glob/Glob.pm
index bac98324f4..6b5ff84f46 100644
--- a/ext/File/Glob/Glob.pm
+++ b/ext/File/Glob/Glob.pm
@@ -6,10 +6,10 @@ use vars qw($VERSION @ISA @EXPORT_OK @EXPORT_FAIL
%EXPORT_TAGS $AUTOLOAD $DEFAULT_FLAGS);
require Exporter;
-require DynaLoader;
+use XSLoader ();
require AutoLoader;
-@ISA = qw(Exporter DynaLoader AutoLoader);
+@ISA = qw(Exporter AutoLoader);
@EXPORT_OK = qw(
csh_glob
@@ -91,7 +91,7 @@ sub AUTOLOAD {
goto &$AUTOLOAD;
}
-bootstrap File::Glob $VERSION;
+XSLoader::load 'File::Glob', $VERSION;
# Preloaded methods go here.
diff --git a/ext/GDBM_File/GDBM_File.pm b/ext/GDBM_File/GDBM_File.pm
index 99ad60b70e..663a679a4d 100644
--- a/ext/GDBM_File/GDBM_File.pm
+++ b/ext/GDBM_File/GDBM_File.pm
@@ -46,8 +46,8 @@ require Carp;
require Tie::Hash;
require Exporter;
use AutoLoader;
-require DynaLoader;
-@ISA = qw(Tie::Hash Exporter DynaLoader);
+use XSLoader ();
+@ISA = qw(Tie::Hash Exporter);
@EXPORT = qw(
GDBM_CACHESIZE
GDBM_FAST
@@ -78,7 +78,7 @@ sub AUTOLOAD {
goto &$AUTOLOAD;
}
-bootstrap GDBM_File $VERSION;
+XSLoader::load 'GDBM_File', $VERSION;
# Preloaded methods go here. Autoload methods go after __END__, and are
# processed by the autosplit program.
diff --git a/ext/IO/IO.pm b/ext/IO/IO.pm
index b6ce21686d..0087530c7e 100644
--- a/ext/IO/IO.pm
+++ b/ext/IO/IO.pm
@@ -2,15 +2,11 @@
package IO;
-require DynaLoader;
-require Exporter;
+use XSLoader ();
use Carp;
-use vars qw(@ISA $VERSION @EXPORT);
-
-@ISA = qw(DynaLoader);
$VERSION = "1.20";
-bootstrap IO $VERSION;
+XSLoader::load 'IO', $VERSION;
sub import {
shift;
diff --git a/ext/NDBM_File/NDBM_File.pm b/ext/NDBM_File/NDBM_File.pm
index 8db59ee03c..578148c56e 100644
--- a/ext/NDBM_File/NDBM_File.pm
+++ b/ext/NDBM_File/NDBM_File.pm
@@ -8,13 +8,13 @@ BEGIN {
use vars qw($VERSION @ISA);
require Tie::Hash;
-require DynaLoader;
+use DynaLoader ();
-@ISA = qw(Tie::Hash DynaLoader);
+@ISA = qw(Tie::Hash);
$VERSION = "1.03";
-bootstrap NDBM_File $VERSION;
+XSLoader::load 'NDBM_File', $VERSION;
1;
diff --git a/ext/ODBM_File/ODBM_File.pm b/ext/ODBM_File/ODBM_File.pm
index 0af875dc36..6199443a32 100644
--- a/ext/ODBM_File/ODBM_File.pm
+++ b/ext/ODBM_File/ODBM_File.pm
@@ -4,13 +4,13 @@ use strict;
use vars qw($VERSION @ISA);
require Tie::Hash;
-require DynaLoader;
+use DynaLoader ();
-@ISA = qw(Tie::Hash DynaLoader);
+@ISA = qw(Tie::Hash);
$VERSION = "1.02";
-bootstrap ODBM_File $VERSION;
+XSLoader::load 'ODBM_File', $VERSION;
1;
diff --git a/ext/Opcode/Opcode.pm b/ext/Opcode/Opcode.pm
index ff3899f835..3915b40980 100644
--- a/ext/Opcode/Opcode.pm
+++ b/ext/Opcode/Opcode.pm
@@ -10,8 +10,8 @@ $XS_VERSION = "1.03";
use strict;
use Carp;
use Exporter ();
-use DynaLoader ();
-@ISA = qw(Exporter DynaLoader);
+use XSLoader ();
+@ISA = qw(Exporter);
BEGIN {
@EXPORT_OK = qw(
@@ -28,7 +28,7 @@ sub opset_to_hex ($);
sub opdump (;$);
use subs @EXPORT_OK;
-bootstrap Opcode $XS_VERSION;
+XSLoader::load 'Opcode', $XS_VERSION;
_init_optags();
diff --git a/ext/POSIX/POSIX.pm b/ext/POSIX/POSIX.pm
index d43b8ca282..a38c74dcca 100644
--- a/ext/POSIX/POSIX.pm
+++ b/ext/POSIX/POSIX.pm
@@ -9,10 +9,10 @@ require Config;
use Symbol;
require Exporter;
-require DynaLoader;
-@ISA = qw(Exporter DynaLoader);
+use XSLoader ();
+@ISA = qw(Exporter);
-$VERSION = $VERSION = "1.03" ;
+$VERSION = "1.03" ;
%EXPORT_TAGS = (
@@ -195,7 +195,7 @@ sub import {
}
-bootstrap POSIX $VERSION;
+XSLoader::load 'POSIX', $VERSION;
my $EINVAL = constant("EINVAL", 0);
my $EAGAIN = constant("EAGAIN", 0);
diff --git a/ext/SDBM_File/SDBM_File.pm b/ext/SDBM_File/SDBM_File.pm
index 34c971734c..1f3b4000e2 100644
--- a/ext/SDBM_File/SDBM_File.pm
+++ b/ext/SDBM_File/SDBM_File.pm
@@ -4,13 +4,13 @@ use strict;
use vars qw($VERSION @ISA);
require Tie::Hash;
-require DynaLoader;
+use XSLoader ();
-@ISA = qw(Tie::Hash DynaLoader);
+@ISA = qw(Tie::Hash);
$VERSION = "1.02" ;
-bootstrap SDBM_File $VERSION;
+XSLoader::load 'SDBM_File', $VERSION;
1;
diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm
index a0bb95d6e4..1fa108fd72 100644
--- a/ext/Socket/Socket.pm
+++ b/ext/Socket/Socket.pm
@@ -162,8 +162,8 @@ have AF_UNIX in the right place.
use Carp;
require Exporter;
-require DynaLoader;
-@ISA = qw(Exporter DynaLoader);
+use XSLoader ();
+@ISA = qw(Exporter);
@EXPORT = qw(
inet_aton inet_ntoa pack_sockaddr_in unpack_sockaddr_in
pack_sockaddr_un unpack_sockaddr_un
@@ -333,6 +333,6 @@ sub AUTOLOAD {
goto &$AUTOLOAD;
}
-bootstrap Socket $VERSION;
+XSLoader::load 'Socket', $VERSION;
1;
diff --git a/ext/Thread/Thread.pm b/ext/Thread/Thread.pm
index 7956a7984f..f15883e029 100644
--- a/ext/Thread/Thread.pm
+++ b/ext/Thread/Thread.pm
@@ -1,11 +1,11 @@
package Thread;
require Exporter;
-require DynaLoader;
+use XSLoader ();
use vars qw($VERSION @ISA @EXPORT);
$VERSION = "1.0";
-@ISA = qw(Exporter DynaLoader);
+@ISA = qw(Exporter);
@EXPORT_OK = qw(yield cond_signal cond_broadcast cond_wait async);
=head1 NAME
@@ -204,6 +204,6 @@ sub eval {
return eval { shift->join; };
}
-bootstrap Thread;
+XSLoader::load 'Thread';
1;
diff --git a/ext/attrs/attrs.pm b/ext/attrs/attrs.pm
index cec5ea5fcd..f744e36c66 100644
--- a/ext/attrs/attrs.pm
+++ b/ext/attrs/attrs.pm
@@ -1,9 +1,6 @@
package attrs;
-require DynaLoader;
-use vars '@ISA';
-@ISA = 'DynaLoader';
+use XSLoader ();
-use vars qw($VERSION);
$VERSION = "1.0";
=head1 NAME
@@ -56,6 +53,6 @@ subroutine is entered.
=cut
-bootstrap attrs $VERSION;
+XSLoader::load 'attrs', $VERSION;
1;
diff --git a/ext/re/re.pm b/ext/re/re.pm
index 842e39ad75..3f142d9de4 100644
--- a/ext/re/re.pm
+++ b/ext/re/re.pm
@@ -105,9 +105,8 @@ sub bits {
foreach my $s (@_){
if ($s eq 'debug' or $s eq 'debugcolor') {
setcolor() if $s eq 'debugcolor';
- require DynaLoader;
- @ISA = ('DynaLoader');
- bootstrap re;
+ require XSLoader;
+ XSLoader::load('re');
install() if $on;
uninstall() unless $on;
next;