Jacquard/Actor/Role/DataPrinter.pm

filter: Statementstmt 63.6% 14 / 22 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod n/a totaltotal 62.0% 18 / 29 CC 2 SCAR 5.5
CC
2
Cov
58%
_data_printer
3.2
BEGIN
1.0
BEGIN
1.0
CRAP 1.7
« Jacquard/Role/Render/QnD/Size/Direct.pm ↑ Summary Jacquard/Layout/Grid.pm »
1 1 ▶use Renard::Incunabula::Common::Setup;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 package Intertangle::Jacquard::Actor::Role::DataPrinter;
3 # ABSTRACT: Role to do Data::Printer things
4 1 $Intertangle::Jacquard::Actor::Role::DataPrinter::VERSION = '0.001';
5 1 ▶use Mu::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 requires '_data_printer_internal';
8  
9 sub _data_printer {
10 0 ▶ my ($self, $prop) = @_;
Subroutine _data_printer: not called CC=2 SCAR=11.6
11  
12 1 ▶ use Module::Load;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 BEGIN {
14 1 ▶ eval {
Subroutine BEGIN: called CC=1 SCAR=0.4
15 1 autoload Data::Printer::Filter;
16 0 autoload Term::ANSIColor;
17 };
18 }
19  
20 0 my $text = '';
21  
22 0 ▶ $text .= $prop->{colored} ? "(@{[colored(['green'], ref($self))]}) " : "(@{[ ref($self) ]}) ";
Branch: 1 branch
BranchTrueFalseTotal
$prop->{'colored'} ? : 0 0 0
23 0 $text .= Data::Printer::np($self->_data_printer_internal, %$prop, );
24  
25 0 $text;
26 }
27  
28 1 1;
29  
30 __END__
31  
32 =pod
33  
34 =encoding UTF-8
35  
36 =head1 NAME
37  
38 Intertangle::Jacquard::Actor::Role::DataPrinter - Role to do Data::Printer things
39  
40 =head1 VERSION
41  
42 version 0.001
43  
44 =head1 AUTHOR
45  
46 Zakariyya Mughal <zmughal@cpan.org>
47  
48 =head1 COPYRIGHT AND LICENSE
49  
50 This software is copyright (c) 2017 by Zakariyya Mughal.
51  
52 This is free software; you can redistribute it and/or modify it under
53 the same terms as the Perl 5 programming language system itself.
54  
55 =cut
« Jacquard/Role/Render/QnD/Size/Direct.pm ↑ Summary Jacquard/Layout/Grid.pm »