Commit | Line | Data |
---|---|---|
6aaee015 | 1 | use strict; |
2 | my $old = select STDERR; $|++; # turn on autoflush | |
3 | select $old; $|++; # turn on autoflush | |
4 | $0 = shift(@ARGV); # rename the script | |
5 | my $rv = do($0); # execute the file | |
6 | die $@ if $@; # die on parse/execute error | |
7 | ||
8 | ### XXX 'do' returns last statement evaluated, which may be | |
9 | ### undef as well. So don't die in that case. | |
10 | #die $! if not defined $rv; # die on execute error |