File Coverage

lib/XT/Files/Plugin/Excludes.pm
Criterion Covered Total %
statement 22 22 100.0
branch 2 2 100.0
condition n/a
subroutine 5 5 100.0
pod 1 1 100.0
total 30 30 100.0


line stmt bran cond sub pod time code
1             package XT::Files::Plugin::Excludes;
2              
3 7     7   3621 use 5.006;
  7         25  
4 7     7   40 use strict;
  7         10  
  7         198  
5 7     7   38 use warnings;
  7         13  
  7         340  
6              
7             our $VERSION = '0.002';
8              
9 7     7   460 use parent 'XT::Files::Plugin';
  7         301  
  7         35  
10              
11             sub run {
12 8     8 1 3303 my ( $self, $args ) = @_;
13              
14 8         158 my $xtf = $self->xtf;
15              
16             ARG:
17 8         43 for my $arg ( @{$args} ) {
  8         19  
18 18         28 my ( $key, $value ) = @{$arg};
  18         39  
19              
20 18 100       53 if ( $key eq 'exclude' ) {
21 17         49 $xtf->exclude($value);
22 17         34 next ARG;
23             }
24              
25 1         11 $self->log_fatal("Invalid configuration option '$key = $value' for plugin 'Excludes'");
26             }
27              
28 7         24 return;
29             }
30              
31             1;
32              
33             __END__