blib/lib/XT/Files/Plugin/lib.pm untested

filter: Statementstmt 0.0% 0 / 34 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 3 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 51 CC 4 SCAR 22.2
CC
4
Cov
0%
run
20.0
BEGIN
2.0
BEGIN
2.0
CRAP 9.2
1 package XT::Files::Plugin::lib; ## no critic (NamingConventions::Capitalization)
2  
3 use 5.006;
4 use strict;
5 use warnings;
6  
7 our $VERSION = '0.001';
8  
9 use parent 'XT::Files::Plugin';
10  
11 use Cwd ();
12 use lib ();
13  
14 sub run {
15 my ( $self, $args ) = @_;
16  
17 ARG:
18 for my $arg ( @{$args} ) {
19 my ( $key, $value ) = @{$arg};
20  
21 if ( $key eq 'lib' ) {
22 if ( -d $value ) {
23 my $dir = Cwd::abs_path($value);
24  
25 if ( ( defined $dir ) && ( -d $dir ) ) {
26 lib->import($dir);
27 }
28 }
29  
30 next ARG;
31 }
32  
33 $self->log_fatal("Invalid configuration option '$key = $value' for plugin 'lib'");
34 }
35  
36 return;
37 }
38  
39 1;
40  
41 __END__