develooper Front page | perl.perl5.porters | Postings from November 2003

[PATCH] configpm, our $summary : unique

Thread Next
From:
Elizabeth Mattijsen
Date:
November 15, 2003 13:18
Subject:
[PATCH] configpm, our $summary : unique
Message ID:
p05111b03bbdc478d10cb@[192.168.56.3]
This patch should fix the problem introduced by my in 5.8.1.

It changes the myconfig subroutine to use the file lexical 
"$summary_expanded"as storage for the expanded summary, instead of 
just as a flag.  This should therefore keep the memory saving feature 
of : unique for $summary, but allow it to be executed after a perl 
interpreter has been cloned (at the expense of taking up more memory 
then).

The new code looks like this:


  my $summary_expanded;

  sub myconfig {
     return $summary_expanded if $summary_expanded;
     ($summary_expanded = $summary) =~ s{\$(\w+)}
                  { my $c = $Config{$1}; defined($c) ? $c : 'undef' }ge;
     $summary_expanded;
  }


Liz
Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About