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

filter: Statementstmt 0.0% 0 / 33 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 3 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 9 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 53 CC 4 SCAR 20.8
CC
4
Cov
0%
BUILD
20.0
log_prefix
2.0
BEGIN
2.0
CRAP 8.0
1 package XT::Files::Plugin;
2  
3 use 5.006;
4 use strict;
5 use warnings;
6  
7 our $VERSION = '0.001';
8  
9 use Class::Tiny 1 qw(name xtf);
10  
11 use Role::Tiny::With ();
12  
13 Role::Tiny::With::with 'XT::Files::Role::Logger';
14  
15 use Carp ();
16 use Scalar::Util ();
17  
18 sub BUILD {
19 my ( $self, $args ) = @_;
20  
21 my $xtf = $self->xtf;
22 Carp::croak 'xtf attribute required' if !defined $xtf;
23 Carp::croak q{'xtf' is not of class 'XT::Files'} if !defined Scalar::Util::blessed($xtf) || !$xtf->isa('XT::Files');
24  
25 if ( !defined $self->name ) {
26 $self->name( Scalar::Util::blessed($self) );
27 }
28  
29 return;
30 }
31  
32 sub log_prefix {
33 my ($self) = @_;
34  
35 return $self->name;
36 }
37  
38 1;
39  
40 __END__