Allow eliminate_macros() and fixpath() to handle space-delimited
[p5sagit/p5-mst-13.2.git] / lib / File / CheckTree.pm
index a39308b..ae18777 100644 (file)
@@ -105,7 +105,7 @@ sub validate {
 
 sub valmess {
     local($disposition,$this) = @_;
-    $file = $cwd . '/' . $file unless $file =~ m|^/|;
+    $file = $cwd . '/' . $file unless $file =~ m|^/|s;
     if ($this =~ /^(!?)-(\w)\s+\$file\s*$/) {
        $neg = $1;
        $tmp = $2;
@@ -137,13 +137,13 @@ sub valmess {
            $mess =~ s/ does not / should not / ||
            $mess =~ s/ not / /;
        }
-       print STDERR $mess,"\n";
     }
     else {
        $this =~ s/\$file/'$file'/g;
-       print STDERR "Can't do $this.\n";
+       $mess = "Can't do $this.\n";
     }
-    if ($disposition eq 'die') { exit 1; }
+    die "$mess\n" if $disposition eq 'die';
+    warn "$mess\n";
     ++$warnings;
 }