if (ref $expected eq 'Regexp') {
$pass = $got =~ $expected;
unless ($pass) {
- unshift(@mess, "# got '$got'\n");
+ unshift(@mess, "# got '$got'\n",
+ "# expected /$expected/\n");
}
} else {
$pass = $got =~ /$expected/;
}
-sub BAILOUT {
- print STDOUT "Bail out! @_\n";
- exit;
+sub DIE {
+ print STDOUT "# @_\n";
+ exit 1;
}
# A somewhat safer version of the sometimes wrong $^X.
} else {
$exe = $Config{_exe};
}
+ $exe = '' unless defined $exe;
# This doesn't absolutize the path: beware of future chdirs().
# We could do File::Spec->abs2rel() but that does getcwd()s,
return $Perl;
}
+sub unlink_all {
+ foreach my $file (@_) {
+ 1 while unlink $file;
+ print "# Couldn't unlink '$file': $!\n" if -f $file;
+ }
+}
1;