Permalink
Browse files

Update NQP::Configure to handle Win32 oddities.

  • Loading branch information...
1 parent b4ae484 commit eeb63e99ead01bb4852a9e4b3d92f808903019fb @pmichaud pmichaud committed Jun 9, 2011
Showing with 8 additions and 8 deletions.
  1. +8 −8 tools/lib/NQP/Configure.pm
View
16 tools/lib/NQP/Configure.pm
@@ -84,7 +84,7 @@ sub read_config {
while (<$CONFIG>) {
if (/^([\w:]+)=(.*)/) { $config{$1} = $2 }
}
- close($CONFIG) or die $!;
+ close($CONFIG);
}
last if %config;
}
@@ -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');

0 comments on commit eeb63e9

Please sign in to comment.