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   3297 use 5.006;
  7         20  
4 7     7   37 use strict;
  7         13  
  7         174  
5 7     7   35 use warnings;
  7         12  
  7         322  
6              
7             our $VERSION = '0.001';
8              
9 7     7   470 use parent 'XT::Files::Plugin';
  7         292  
  7         56  
10              
11             sub run {
12 8     8 1 3153 my ( $self, $args ) = @_;
13              
14 8         159 my $xtf = $self->xtf;
15              
16             ARG:
17 8         42 for my $arg ( @{$args} ) {
  8         22  
18 18         29 my ( $key, $value ) = @{$arg};
  18         37  
19              
20 18 100       46 if ( $key eq 'exclude' ) {
21 17         51 $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         21 return;
29             }
30              
31             1;
32              
33             __END__