blib/lib/Term/ExtendedColor/Dzen.pm

filter: Statementstmt 62.9% 17 / 27 Branchbran 0.0% 0 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 100% 2 / 2 totaltotal 50.0% 24 / 48 CC 7 SCAR 25.4
CC
7
Cov
44%
fgd
20.0
bgd
20.0
BEGIN
1.0
CRAP 12.7
↑ Summary
1 package Term::ExtendedColor::Dzen;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 BEGIN {
6 1 ▶ use Exporter;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶ use vars qw($VERSION @ISA @EXPORT_OK %EXPORT_TAGS);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶ $VERSION = '0.004';
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 @ISA = qw(Exporter);
11  
12 1 @EXPORT_OK = qw(
13 fgd
14 bgd
15 );
16  
17 1 %EXPORT_TAGS = (
18 attributes => [ qw(fgd bgd) ],
19 all => [ @EXPORT_OK ],
20 );
21 }
22  
23  
24 sub fgd {
25 0 ▶ if(!@_) {
Subroutine fgd: not called CC=4 SCAR=30.0
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
unless (@_) 0 0 0
26 0 return "^fg()"
27 }
28 0 my ($color, $data) = @_;
29 0 ▶ $color = "#$color" unless $color =~ m/^#/;
Branch: 1 branch
BranchTrueFalseTotal
unless $color =~ /^#/ 0 0 0
30  
31 0 ▶ return (defined($data))
Branch: 1 branch
BranchTrueFalseTotal
defined $data ? : 0 0 0
32 ? "^fg($color)$data^fg()"
33 : "^fg($color)"
34 }
35  
36 sub bgd {
37 0 ▶ if(!@_) {
Subroutine bgd: not called CC=4 SCAR=30.0
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
unless (@_) 0 0 0
38 0 return "^bg()"
39 }
40 0 my ($color, $data) = @_;
41 0 ▶ $color = "#$color" unless $color =~ m/^#/;
Branch: 1 branch
BranchTrueFalseTotal
unless $color =~ /^#/ 0 0 0
42  
43 0 ▶ return (defined($data))
Branch: 1 branch
BranchTrueFalseTotal
defined $data ? : 0 0 0
44 ? "^bg($color)$data^bg()"
45 : "^bg($color)"
46 }
47  
48  
49  
50  
51 1 1;
52  
53 __END__
↑ Summary