File Coverage

lib/Devel/ebug/Plugin/Eval.pm
Criterion Covered Total %
statement 15 15 100.0
branch 2 2 100.0
condition n/a
subroutine 5 5 100.0
pod 0 2 0.0
total 22 24 91.6


line stmt bran cond sub pod time code
1             package Devel::ebug::Plugin::Eval;
2              
3 19     19   11407 use strict;
  19         42  
  19         555  
4 19     19   92 use warnings;
  19         32  
  19         502  
5 19     19   87 use base qw(Exporter);
  19         37  
  19         4983  
6             our @EXPORT = qw(eval yaml);
7              
8             our $VERSION = '0.64'; # VERSION
9              
10             # eval
11             sub eval {
12 11     11 0 5736 my($self, $eval) = @_;
13 11         65 my $response = $self->talk({
14             command => "eval",
15             eval => $eval,
16             });
17             return wantarray ? ( $response->{eval}, $response->{exception} ) : ## no critic (Community::Wantarray)
18 11 100       128 $response->{eval};
19             }
20              
21             # yaml
22             sub yaml {
23 1     1 0 3 my($self, $yaml) = @_;
24 1         6 my $response = $self->talk({
25             command => "yaml",
26             yaml => $yaml,
27             });
28 1         8 return $response->{yaml};
29             }
30              
31             1;
32              
33             __END__