line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Teng::Plugin::RowObjectCreationSwitcher; |
2
|
1
|
|
|
1
|
|
1039
|
use 5.008005; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
38
|
|
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
34
|
|
4
|
1
|
|
|
1
|
|
15
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
62
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = "0.03"; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
985
|
use Scope::Guard; |
|
1
|
|
|
|
|
415
|
|
|
1
|
|
|
|
|
38
|
|
9
|
1
|
|
|
1
|
|
4
|
use Carp qw(); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
120
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @EXPORT = qw(temporary_suppress_row_objects_guard); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub temporary_suppress_row_objects_guard { |
14
|
0
|
|
|
0
|
1
|
|
my ($self, $new_status) = @_; |
15
|
|
|
|
|
|
|
|
16
|
0
|
0
|
|
|
|
|
if( @_ < 2 ) { #missing $new_status |
17
|
0
|
|
|
|
|
|
Carp::croak('error: missing argument'); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
my $current_status = $self->suppress_row_objects(); #preserve current(for guard object) |
21
|
0
|
|
|
|
|
|
$self->suppress_row_objects($new_status); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
return Scope::Guard->new(sub { |
24
|
0
|
|
|
0
|
|
|
$self->suppress_row_objects($current_status); |
25
|
0
|
|
|
|
|
|
}); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
__END__ |