This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
[win32] merge changes#989,990,992 from maintbranch
[perl5.git]
/
t
/
op
/
die.t
1
#!./perl
2
3
print "1..6\n";
4
5
$SIG{__DIE__} = sub { print ref($_[0]) ? ("ok ",$_[0]->[0]++,"\n") : @_ } ;
6
7
$err = "ok 1\n";
8
eval {
9
die $err;
10
};
11
12
print "not " unless $@ eq $err;
13
print "ok 2\n";
14
15
$x = [3];
16
eval { die $x; };
17
18
print "not " unless $x->[0] == 4;
19
print "ok 4\n";
20
21
eval {
22
eval {
23
die [ 5 ];
24
};
25
die if $@;
26
};