open CONFIG, ">$config_pm" or die "Can't open $config_pm: $!\n";
$myver = $];
-print CONFIG <<"ENDOFBEG";
+print CONFIG <<'ENDOFBEG_NOQ', <<"ENDOFBEG";
package Config;
use Exporter ();
-\@ISA = (Exporter);
-\@EXPORT = qw(%Config);
-\@EXPORT_OK = qw(myconfig config_sh config_vars);
+@EXPORT = qw(%Config);
+@EXPORT_OK = qw(myconfig config_sh config_vars);
+
+# Define our own import method to avoid pulling in the full Exporter:
+sub import {
+ my $pkg = shift;
+ @_ = @EXPORT unless @_;
+ my @func = grep {$_ ne '%Config'} @_;
+ Exporter::import('Config', @func) if @func;
+ return if @func == @_;
+ my $callpkg = caller(0);
+ *{"$callpkg\::Config"} = \%Config;
+}
+ENDOFBEG_NOQ
\$] == $myver
or die "Perl lib version ($myver) doesn't match executable version (\$])";
package POSIX;
-use vars qw($VERSION @ISA %EXPORT_TAGS @EXPORT_OK $AUTOLOAD);
+# use vars qw($VERSION @ISA %EXPORT_TAGS @EXPORT_OK $AUTOLOAD);
+(@ISA, %EXPORT_TAGS,@EXPORT_OK,$AUTOLOAD) = ();
use Carp;
use AutoLoader;
require DynaLoader;
@ISA = qw(Exporter DynaLoader);
-$VERSION = "1.02" ;
+$VERSION = $VERSION = "1.03" ;
%EXPORT_TAGS = (
);
-Exporter::export_tags();
+# Exporter::export_tags();
+for (values %EXPORT_TAGS) {
+ push @EXPORT, @$_;
+}
@EXPORT_OK = qw(
closedir opendir readdir rewinddir
package AutoLoader;
-use vars qw(@EXPORT @EXPORT_OK $VERSION);
+# use vars qw(@EXPORT @EXPORT_OK $VERSION);
my $is_dosish;
my $is_vms;
BEGIN {
require Exporter;
- @EXPORT = ();
- @EXPORT_OK = qw(AUTOLOAD);
+ @EXPORT = @EXPORT = ();
+ @EXPORT_OK = @EXPORT_OK = qw(AUTOLOAD);
$is_dosish = $^O eq 'dos' || $^O eq 'os2' || $^O eq 'MSWin32';
$is_vms = $^O eq 'VMS';
- $VERSION = '5.56';
+ $VERSION = $VERSION = '5.57';
}
AUTOLOAD {
# Export symbols, but not by accident of inheritance.
#
- Exporter::export $pkg, $callpkg, @_ if $pkg eq 'AutoLoader';
+ if ($pkg eq 'AutoLoader') {
+ local $Exporter::ExportLevel = 1;
+ Exporter::import $pkg, @_;
+ }
#
# Try to find the autosplit index file. Eg., if the call package
package SelfLoader;
-use Carp;
+# use Carp;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(AUTOLOAD);
my %Cache; # private cache for all SelfLoader's client packages
+sub croak { require Carp; goto &Carp::croak }
+
AUTOLOAD {
print STDERR "SelfLoader::AUTOLOAD for $AUTOLOAD\n" if $DEBUG;
my $SL_code = $Cache{$AUTOLOAD};
sub _add_to_cache {
my($self,$fullname,$pack,$lines, $protoype) = @_;
return () unless $fullname;
- carp("Redefining sub $fullname") if exists $Cache{$fullname};
+ (require Carp), Carp::carp("Redefining sub $fullname")
+ if exists $Cache{$fullname};
$Cache{$fullname} = join('', "package $pack; ",@$lines);
print STDERR "SelfLoader cached $fullname: $Cache{$fullname}" if $DEBUG;
# return stub to be eval'd