Skip to content

Commit 2afa323

Browse files
committed
Simplify optimize override
Adding comments causes downstream issues with a few CPAN mods.
1 parent c197254 commit 2afa323

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/Perl/Dist/Strawberry/Step/InstallPerlCore.pm

+5-1
Original file line numberDiff line numberDiff line change
@@ -261,17 +261,21 @@ sub run {
261261
my $config_heavy = catfile($image_dir, qw/perl lib Config_heavy.pl/);
262262
if (-e $config_heavy) { # it should always be there
263263
$self->boss->message(3, "Updating optimize settings in Config_heavy.pl");
264+
#use File::Copy qw /copy/;
265+
#my $bk = "${config_heavy}.orig";
266+
#copy $config_heavy, $bk; # directory rw probs - disable for now
264267
local $/ = undef;
265268
open my $fh, $config_heavy or die "Unable to open $config_heavy for reading, $?";
266269
my $data = <$fh>;
267270
$fh->close;
268271
# now update the file
269-
$data =~ s/^(optimize=.+)$/# SP POST-BUILD OVERRIDE\noptimize='-O2'\n#$1/ms;
272+
$data =~ s/^(optimize=.+)$/optimize='-O2'/m;
270273
my $ro_flag = $self->_unset_ro($config_heavy);
271274
open my $ofh, '>', $config_heavy or die "Unable to open $config_heavy for writing, $?";
272275
print {$ofh} $data;
273276
$ofh->close;
274277
$self->_restore_ro($config_heavy, $ro_flag);
278+
#$self->_restore_ro($bk, $ro_flag);
275279
}
276280
};
277281

0 commit comments

Comments
 (0)