Plagger/Rule/Expression.pm untested

filter: Statementstmt 0.0% 0 / 11 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 17 CC 2 SCAR 13.9
CC
2
Cov
0%
dispatch
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 4.0
1 package Plagger::Rule::Expression;
2 use strict;
3 use base qw( Plagger::Rule );
4  
5 sub dispatch {
6 my($self, $args) = @_;
7 my $status = eval $self->{expression};
8 if ($@) {
9 Plagger->context->log(error => "Expression error: $@ with '$self->{expression}'");
10 }
11 $status;
12 }
13  
14 1;