So need to propagate errors with $@.
p4raw-id: //depot/perl@29723
-do './hints/linux.pl';
+do './hints/linux.pl' or die $@;
-do './hints/linux.pl';
+do './hints/linux.pl' or die $@;
-do './hints/linux.pl';
+do './hints/linux.pl' or die $@;
-do './hints/linux.pl';
+do './hints/linux.pl' or die $@;
-do './hints/linux.pl';
+do './hints/linux.pl' or die $@;
-do './hints/linux.pl';
+do './hints/linux.pl' or die $@;
-do './hints/linux.pl';
+do './hints/linux.pl' or die $@;
-do './hints/linux.pl';
+do './hints/linux.pl' or die $@;
-do './hints/linux.pl';
+do './hints/linux.pl' or die $@;
-do './hints/linux.pl';
+do './hints/linux.pl' or die $@;
@vars = split( ' ', $2 );
# If main::dumpvar isn't here, get it.
- do 'dumpvar.pl' unless defined &main::dumpvar;
+ do 'dumpvar.pl' || die $@ unless defined &main::dumpvar;
if ( defined &main::dumpvar ) {
# We got it. Turn off subroutine entry/exit messages
and next CMD;
# Load up dumpvar if we don't have it. If we can, that is.
- do 'dumpvar.pl' unless defined &main::dumpvar;
+ do 'dumpvar.pl' || die $@ unless defined &main::dumpvar;
defined &main::dumpvar
or print $OUT "dumpvar.pl not available.\n"
and next CMD;
# Load dumpvar.pl unless we've already got the sub we need from it.
unless ( defined &main::dumpValue ) {
- do 'dumpvar.pl';
+ do 'dumpvar.pl' or die $@;
}
# If the load succeeded (or we already had dumpvalue()), go ahead
return $Cache{$class, $file};
}
- $list = do $file;
+ $list = do $file; die $@ if $@;
}
$ListSorted = 1; ## we know that these lists are sorted
print "Configuring...\n";
print "Configuring with: Perl version $] ($^X)\n";
-do "sanity.pl";
+do "sanity.pl" or die $@;
-my %VERSION = %{ do "version.pl" };
+my %VERSION = %{ do "version.pl" or die $@ };
printf "Configuring for: Perl version $VERSION{REVISION}.%03d%03d\n",
$VERSION{VERSION}, $VERSION{SUBVERSION};
my $R_V_SV = "$VERSION{REVISION}.$VERSION{VERSION}.$VERSION{SUBVERSION}";
my ($SYMBIAN_ROOT, $SYMBIAN_VERSION, $SDK_NAME, $SDK_VARIANT, $SDK_VERSION) =
- @{ do "sdk.pl" };
-my %PORT = %{ do "port.pl" };
+ @{ do "sdk.pl" or die $@ };
+my %PORT = %{ do "port.pl" or die $@ };
if ($SYMBIAN_ROOT eq 'C:\Symbian\Series60_1_2_CW') {
( $SYMBIAN_VERSION, $SDK_VERSION ) = qw(6.1 1.2);
print "Symbian $SYMBIAN_VERSION SDK $SDK_VARIANT $SDK_VERSION ($WIN) installed at $SYMBIAN_ROOT\n";
-my $CWD = do "cwd.pl";
+my $CWD = do "cwd.pl" or die $@;
print "Build directory $CWD\n";
die "$0: '+' in cwd does not work with Series 60 SDK 1.2\n"
use strict;
use lib "symbian";
-do "sanity.pl";
+do "sanity.pl" or die $@;
-my %VERSION = %{ do "version.pl" };
+my %VERSION = %{ do "version.pl" or die $@ };
my $VERSION = "$VERSION{REVISION}$VERSION{VERSION}$VERSION{SUBVERSION}";
my $R_V_SV = "$VERSION{REVISION}.$VERSION{VERSION}.$VERSION{SUBVERSION}";
my ($SYMBIAN_ROOT, $SYMBIAN_VERSION, $SDK_NAME, $SDK_VARIANT, $SDK_VERSION) =
- @{ do "sdk.pl" };
-my $UID = do "uid.pl";
-my %PORT = %{ do "port.pl" };
+ @{ do "sdk.pl" or die $@ };
+my $UID = do "uid.pl" or die $@;
+my %PORT = %{ do "port.pl" or die $@ };
my $ARM = 'thumb'; # TODO
my $S60SDK = $ENV{S60SDK}; # from sdk.pl
use File::Basename;
use Cwd;
-do "sanity.pl";
+do "sanity.pl" or die $@;
my $CoreBuild = -d "ext" && -f "perl.h" && -d "symbian" && -f "perl.c";
if ($CoreBuild) {
unshift @INC, "symbian";
- do "sanity.pl";
- my %VERSION = %{ do "version.pl" };
+ do "sanity.pl" or die $@;
+ my %VERSION = %{ do "version.pl" or die $@ };
($SYMBIAN_ROOT, $SYMBIAN_VERSION, $SDK_NAME, $SDK_VARIANT, $SDK_VERSION) =
- @{ do "sdk.pl" };
+ @{ do "sdk.pl" or die $@ };
$VERSION = "$VERSION{REVISION}$VERSION{VERSION}$VERSION{SUBVERSION}";
$R_V_SV = "$VERSION{REVISION}.$VERSION{VERSION}.$VERSION{SUBVERSION}";
- $BUILDROOT = do "cwd.pl";
+ $BUILDROOT = do "cwd.pl" or die $@;
$PerlVersion = $R_V_SV;
}
write_file("bleah.do", <<EOT);
\$x = "not ok $i\\n";
EOT
-do "bleah.do";
+do "bleah.do" or die $@;
dofile();
-sub dofile { do "bleah.do"; };
+sub dofile { do "bleah.do" or die $@; };
print $x;
# Test that scalar context is forced for require
$::testing_caller = 1;
-do './op/caller.pl';
+do './op/caller.pl' or die $@;
close DO or die "Could not close: $!";
}
-my $a = do "$$.16";
+my $a = do "$$.16"; die $@ if $@;
if (open(DO, ">$$.17")) {
print DO "ok(1, 'do in list context') if defined wantarray && wantarray\n";
close DO or die "Could not close: $!";
}
-my @a = do "$$.17";
+my @a = do "$$.17"; die $@ if $@;
if (open(DO, ">$$.18")) {
print DO "ok(1, 'do in void context') if not defined wantarray\n";
close DO or die "Could not close: $!";
}
-do "$$.18";
+do "$$.18"; die $@ if $@;
# bug ID 20010920.007
eval qq{ do qq(a file that does not exist); };
@INC = @orig_INC;
for my $file ('./op/inccode.t', './t/op/inccode.t', ':op:inccode.t') {
if (-r $file) {
- do $file;
+ do $file or die $@;
exit;
}
}
$skip_amp = 1;
for $file ('./op/regexp.t', './t/op/regexp.t', ':op:regexp.t') {
if (-r $file) {
- do $file;
+ do $file or die $@;
exit;
}
}
$qr = 1;
for $file ('./op/regexp.t', './t/op/regexp.t', ':op:regexp.t') {
if (-r $file) {
- do $file;
+ do $file or die $@;
exit;
}
}
$qr = 1;
for $file ('./op/regexp.t', './t/op/regexp.t', ':op:regexp.t') {
if (-r $file) {
- do $file;
+ do $file or die $@;
exit;
}
}
$qr_embed = 1;
for $file ('./op/regexp.t', './t/op/regexp.t', ':op:regexp.t') {
if (-r $file) {
- do $file;
+ do $file or die $@;
exit;
}
}
$qr = 1;
for $file ('./op/regexp.t', './t/op/regexp.t', ':op:regexp.t') {
if (-r $file) {
- do $file;
+ do $file or die $@;
exit;
}
}
# http://www.nntp.perl.org/group/perl.perl5.porters/63123
fresh_perl_is(<<'EOI', 'ok', { }, 'Ensure PL_linestr can be cloned');
use threads;
-print do 'op/threads_create.pl';
+print do 'op/threads_create.pl' || die $@;
EOI
my $file = File::Spec->catfile(File::Spec->catdir(File::Spec->updir,
"lib", "unicore", "To"),
"$base.pl");
- my $simple = do $file;
+ my $simple = do $file or die $@;
my %simple;
for my $i (split(/\n/, $simple)) {
my ($k, $v) = split(' ', $i);
my $bs = $file;
$bs =~ s/(\.\w+)?(;\d*)?$/\.bs/;
if (-s $bs) { # only read file if it's not empty
- eval { do $bs; };
+ do $bs;
warn "$bs: $@\n" if $@;
}