File Coverage

lib/Devel/ebug/Plugin/EvalLevel.pm
Criterion Covered Total %
statement 6 9 66.6
branch 0 2 0.0
condition n/a
subroutine 2 3 66.6
pod 0 1 0.0
total 8 15 53.3


line stmt bran cond sub pod time code
1             package Devel::ebug::Plugin::EvalLevel;
2              
3 1     1   3502 use strict;
  1         3  
  1         71  
4 1     1   9 use base qw(Exporter);
  1         4  
  1         1075  
5              
6             our @EXPORT = qw(eval_level);
7              
8             # eval expression and return the result as a tree of depth "level"
9             sub eval_level {
10 0     0 0   my( $self, $expr, $level ) = @_;
11 0           my $response = $self->talk( { command => "eval_level",
12             eval => $expr,
13             level => $level,
14             } );
15 0 0         return wantarray ? ( $response->{eval}, $response->{exception} ) :
16             $response->{eval};
17             }
18              
19             1;
20