PS1/Plugin/Env.pm

filter: Statementstmt 70.8% 17 / 24 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 100% 1 / 1 totaltotal 65.7% 23 / 35 CC 4 SCAR 22.5
CC
4
Cov
61%
env
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 9.4
« PS1/Plugin/Node.pm ↑ Summary PS1/Plugin/Date.pm »
1 package App::PS1::Plugin::Env;
2  
3 # Created on: 2011-06-21 09:48:15
4 # Create by: Ivan Wills
5 # $Id$
6 # $Revision$, $HeadURL$, $Date$
7 # $Revision$, $Source$, $Date$
8  
9 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use Data::Dumper qw/Dumper/;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use English qw/ -no_match_vars /;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 1 our $VERSION = 0.08;
16  
17 0 ▶sub env {
Subroutine env: not called CC=4 SCAR=30.0
Pod documented
18 0 my ($self, $options) = @_;
19 0 my $out = '';
20 0 for my $name (sort keys %$options) {
21 0 ▶ next if !$ENV{$options->{$name}};
Branch: 1 branch
BranchTrueFalseTotal
unless $ENV{$options->{$name}} 0 0 0
22  
23 0 ▶ $out .= ', ' if $out;
Branch: 1 branch
BranchTrueFalseTotal
if $out 0 0 0
24 0 $out .= "$name: $ENV{$options->{$name}}";
25 }
26  
27 0 return $self->surround(
28 length $out,
29 $out,
30 );
31 }
32  
33 1 1;
34  
35 __END__
« PS1/Plugin/Node.pm ↑ Summary PS1/Plugin/Date.pm »