line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Exec; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
13216
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
44
|
|
4
|
2
|
|
|
2
|
|
7
|
use warnings; |
|
2
|
|
|
|
|
1
|
|
|
2
|
|
|
|
|
46
|
|
5
|
2
|
|
|
2
|
|
759
|
use Return::MultiLevel qw( with_return ); |
|
2
|
|
|
|
|
5301
|
|
|
2
|
|
|
|
|
89
|
|
6
|
2
|
|
|
2
|
|
8
|
use base 'Exporter'; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
200
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# ABSTRACT: Test that some code calls exec without terminating testing |
9
|
|
|
|
|
|
|
our $VERSION = '0.02_01'; # TRIAL VERSION |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our @EXPORT = qw( exec_arrayref ); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $exec_handler = sub { |
15
|
|
|
|
|
|
|
CORE::exec(@_); |
16
|
|
|
|
|
|
|
}; |
17
|
|
|
|
|
|
|
BEGIN { |
18
|
2
|
|
|
2
|
|
155
|
*CORE::GLOBAL::exec = sub { $exec_handler->(@_) }; |
|
3
|
|
|
3
|
|
10
|
|
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub exec_arrayref(&) |
23
|
|
|
|
|
|
|
{ |
24
|
4
|
|
|
4
|
1
|
1146
|
my($code) = @_; |
25
|
|
|
|
|
|
|
return with_return { |
26
|
4
|
|
|
4
|
|
171
|
my($return) = @_; |
27
|
4
|
|
|
|
|
7
|
local $exec_handler = sub { $return->([@_]) }; |
|
3
|
|
|
|
|
8
|
|
28
|
4
|
|
|
|
|
7
|
$code->(); |
29
|
1
|
|
|
|
|
6
|
undef; |
30
|
4
|
|
|
|
|
16
|
}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |