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

[PATCH] configpm, our $summary : unique

Thread Next
Elizabeth Mattijsen
November 15, 2003 13:18
[PATCH] configpm, our $summary : unique
Message ID:
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 

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;

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About