X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FFile%2FCheckTree.pm;h=ae1877741bc995fcce631a4e962f3597d13dd615;hb=bdb84599aeb6d8fcc1319c109c1240cbc6c835db;hp=a39308b6c963093ff28817830f90d7e366692dac;hpb=f06db76b9e41859439aeadb79feb6c603ee741ff;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/File/CheckTree.pm b/lib/File/CheckTree.pm index a39308b..ae18777 100644 --- a/lib/File/CheckTree.pm +++ b/lib/File/CheckTree.pm @@ -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; }