Skip to content

Commit

Permalink
Update NQP::Configure to handle Win32 open oddities.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Jun 9, 2011
1 parent fb4a373 commit 1a64e24
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tools/build/NQP_REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2011.05-50-gb4ae484
2011.05-51-geeb63e9
16 changes: 8 additions & 8 deletions tools/lib/NQP/Configure.pm
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ sub read_config {
while (<$CONFIG>) {
if (/^([\w:]+)=(.*)/) { $config{$1} = $2 }
}
close($CONFIG) or die $!;
close($CONFIG);
}
last if %config;
}
Expand Down Expand Up @@ -123,18 +123,18 @@ END

for my $file (@parrot_config_src) {
no warnings;
if (open my $PARROT, '-|', "$file parrot-config.pir") {
while (<$PARROT>) {
if (/^([\w:]+)=(.*)/) { $config{$1} = $2 }
}
close($PARROT) or die $!;
}
elsif (-r $file && open my $PARROT_CONFIG, '<', $file) {
if ($file =~ /.pir$/ && open my $PARROT_CONFIG, '<', $file) {
while (<$PARROT_CONFIG>) {
if (/P0\["(.*?)"\], "(.*?)"/) { $config{"parrot::$1"} = $2 }
}
close($PARROT_CONFIG) or die $!;
}
elsif (open my $PARROT, '-|', "$file parrot-config.pir") {
while (<$PARROT>) {
if (/^([\w:]+)=(.*)/) { $config{$1} = $2 }
}
close($PARROT);
}
last if %config;
}
unlink('parrot-config.pir');
Expand Down

0 comments on commit 1a64e24

Please sign in to comment.