diff options
author | Richard Levitte <levitte@openssl.org> | 2016-04-06 15:02:57 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-04-06 15:21:27 +0200 |
commit | 2110febb117f477cbcaf6c8fe724848b57f5d433 (patch) | |
tree | f2e2e47c5a77ff1fb72fa0aaaca9a202bfe65007 /Configurations/common.tmpl | |
parent | 1c9f511793ad2fa8249a0d010cf2471769d5cd29 (diff) |
Perl cleanup: don't create lists unnecessarily
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'Configurations/common.tmpl')
-rw-r--r-- | Configurations/common.tmpl | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/Configurations/common.tmpl b/Configurations/common.tmpl index 9c80070ea6..f5c392099b 100644 --- a/Configurations/common.tmpl +++ b/Configurations/common.tmpl @@ -96,12 +96,16 @@ @{$unified_info{shared_sources}->{$lib}}) ], deps => [ reducedepends(resolvedepends($lib)) ], %ordinals); - map { doobj($_, $lib, intent => "lib") } @{$unified_info{shared_sources}->{$lib}}; + foreach (@{$unified_info{shared_sources}->{$lib}}) { + doobj($_, $lib, intent => "lib"); + } } $OUT .= obj2lib(lib => $lib, objs => [ map { (my $x = $_) =~ s|\.o$||; $x } @{$unified_info{sources}->{$lib}} ]); - map { doobj($_, $lib, intent => "lib") } @{$unified_info{sources}->{$lib}}; + foreach (@{$unified_info{sources}->{$lib}}) { + doobj($_, $lib, intent => "lib"); + } $cache{$lib} = 1; } @@ -116,8 +120,10 @@ (@{$unified_info{sources}->{$lib}}, @{$unified_info{shared_sources}->{$lib}}) ], deps => [ resolvedepends($lib) ]); - map { doobj($_, $lib, intent => "dso") } (@{$unified_info{sources}->{$lib}}, - @{$unified_info{shared_sources}->{$lib}}); + foreach ((@{$unified_info{sources}->{$lib}}, + @{$unified_info{shared_sources}->{$lib}})) { + doobj($_, $lib, intent => "dso"); + } $cache{$lib} = 1; } @@ -131,7 +137,9 @@ objs => [ map { (my $x = $_) =~ s|\.o$||; $x } @{$unified_info{sources}->{$bin}} ], deps => $deps); - map { doobj($_, $bin, intent => "bin") } @{$unified_info{sources}->{$bin}}; + foreach (@{$unified_info{sources}->{$bin}}) { + doobj($_, $bin, intent => "bin"); + } $cache{$bin} = 1; } @@ -150,12 +158,12 @@ # Build all known libraries, engines, programs and scripts. # Everything else will be handled as a consequence. - map { dolib($_) } @{$unified_info{libraries}}; - map { doengine($_) } @{$unified_info{engines}}; - map { dobin($_) } @{$unified_info{programs}}; - map { doscript($_) } @{$unified_info{scripts}}; + dolib($_) foreach @{$unified_info{libraries}}; + doengine($_) foreach @{$unified_info{engines}}; + dobin($_) foreach @{$unified_info{programs}}; + doscript($_) foreach @{$unified_info{scripts}}; # Finally, should there be any applicable BEGINRAW/ENDRAW sections, # they are added here. - $OUT .= $_."\n" foreach(@{$unified_info{rawlines}}); + $OUT .= $_."\n" foreach @{$unified_info{rawlines}}; -} |