line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Devel::ebug::Plugin::Eval; |
2
|
|
|
|
|
|
|
|
3
|
19
|
|
|
19
|
|
11380
|
use strict; |
|
19
|
|
|
|
|
39
|
|
|
19
|
|
|
|
|
568
|
|
4
|
19
|
|
|
19
|
|
91
|
use warnings; |
|
19
|
|
|
|
|
36
|
|
|
19
|
|
|
|
|
506
|
|
5
|
19
|
|
|
19
|
|
109
|
use base qw(Exporter); |
|
19
|
|
|
|
|
41
|
|
|
19
|
|
|
|
|
5211
|
|
6
|
|
|
|
|
|
|
our @EXPORT = qw(eval yaml); |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.63'; # VERSION |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# eval |
11
|
|
|
|
|
|
|
sub eval { |
12
|
11
|
|
|
11
|
0
|
5932
|
my($self, $eval) = @_; |
13
|
11
|
|
|
|
|
80
|
my $response = $self->talk({ |
14
|
|
|
|
|
|
|
command => "eval", |
15
|
|
|
|
|
|
|
eval => $eval, |
16
|
|
|
|
|
|
|
}); |
17
|
|
|
|
|
|
|
return wantarray ? ( $response->{eval}, $response->{exception} ) : ## no critic (Freenode::Wantarray) |
18
|
11
|
100
|
|
|
|
233
|
$response->{eval}; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# yaml |
22
|
|
|
|
|
|
|
sub yaml { |
23
|
1
|
|
|
1
|
0
|
13
|
my($self, $yaml) = @_; |
24
|
1
|
|
|
|
|
13
|
my $response = $self->talk({ |
25
|
|
|
|
|
|
|
command => "yaml", |
26
|
|
|
|
|
|
|
yaml => $yaml, |
27
|
|
|
|
|
|
|
}); |
28
|
1
|
|
|
|
|
10
|
return $response->{yaml}; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |