This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Memory Consumption of autosplit_lib_modules/sv_gets (workaround)
authorGurusamy Sarathy <gsar@engin.umich.edu>
Wed, 11 Jun 1997 00:00:00 +0000 (12:00 +1200)
committerTim Bunce <Tim.Bunce@ig.co.uk>
Wed, 11 Jun 1997 00:00:00 +0000 (12:00 +1200)
lib/AutoSplit.pm

index 2fd0cac..1bdcb78 100644 (file)
@@ -126,7 +126,7 @@ sub autosplit{
 sub autosplit_lib_modules{
     my(@modules) = @_; # list of Module names
 
-    foreach(@modules){
+    while($_ = shift @modules){
        s#::#/#g;       # incase specified as ABC::XYZ
        s|\\|/|g;               # bug in ksh OS/2
        s#^lib/##; # incase specified as lib/*.pm
@@ -147,6 +147,7 @@ sub autosplit_lib_modules{
 sub autosplit_file{
     my($filename, $autodir, $keep, $check_for_autoloader, $check_mod_time) = @_;
     my(@names);
+    local($_);
 
     # where to write output files
     $autodir = "lib/auto" unless $autodir;