Skip Menu |
Report information
Id: 1043
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: ilya [at] math.ohio-state.edu
Cc:
AdminCc:

Operating System: generic
PatchStatus: (no value)
Severity: medium
Type: core
Perl Version: (no value)
Fixed In: (no value)



Date: Mon, 26 Jul 1999 21:47:09 -0400
From: Ilya Zakharevich <ilya [...] math.ohio-state.edu>
To: Gurusamy Sarathy <gsar [...] activestate.com>
Cc: Jarkko Hietaniemi <jhi [...] iki.fi>, Mailing list Perl5 <perl5-porters [...] perl.org>
Subject: Re: [PATCH 5.005_57] decrease memory footprint of standard modules
Download (untitled) / with headers
text/plain 3.8k
This is only 95% my fault, all the rest is yours! ;-) I saw this failure, but this was exactly the mode of failure after one of my experimental REx patches, so I thought that I was editing in a wrong directory with that patch applied. (I've lost count on how many patched 5.005_57 directories do I have around.) Better patch follows, thanks, Ilya --- ././configpm.orig Tue Jul 6 06:33:22 1999 +++ ././configpm Mon Jul 26 15:56:28 1999 @@ -19,13 +19,24 @@ my $glossary = $ARGV[1] || 'Porting/Glos 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 (\$])"; --- ././lib/SelfLoader.pm.orig Tue Jul 6 06:34:16 1999 +++ ././lib/SelfLoader.pm Mon Jul 26 00:23:23 1999 @@ -1,5 +1,5 @@ package SelfLoader; -use Carp; +# use Carp; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(AUTOLOAD); @@ -9,6 +9,8 @@ $DEBUG = 0; 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}; @@ -92,7 +94,8 @@ sub _load_stubs { 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 --- ././lib/AutoLoader.pm.orig Tue Jul 6 06:34:05 1999 +++ ././lib/AutoLoader.pm Mon Jul 26 21:35:21 1999 @@ -1,17 +1,17 @@ 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 { @@ -103,7 +103,10 @@ sub import { # 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 --- ././ext/POSIX/POSIX.pm.orig Tue Jul 6 06:33:42 1999 +++ ././ext/POSIX/POSIX.pm Mon Jul 26 16:07:36 1999 @@ -1,6 +1,7 @@ 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; @@ -11,7 +12,7 @@ require Exporter; require DynaLoader; @ISA = qw(Exporter DynaLoader); -$VERSION = "1.02" ; +$VERSION = $VERSION = "1.03" ; %EXPORT_TAGS = ( @@ -161,7 +162,10 @@ $VERSION = "1.02" ; ); -Exporter::export_tags(); +# Exporter::export_tags(); +for (values %EXPORT_TAGS) { + push @EXPORT, @$_; +} @EXPORT_OK = qw( closedir opendir readdir rewinddir


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org