File Coverage

blib/lib/CPAN/Packager/Config/Replacer.pm
Criterion Covered Total %
statement 6 12 50.0
branch n/a
condition n/a
subroutine 2 4 50.0
pod 0 1 0.0
total 8 17 47.0


line stmt bran cond sub pod time code
1             package CPAN::Packager::Config::Replacer;
2 2     2   13 use strict;
  2         5  
  2         90  
3 2     2   13 use warnings;
  2         5  
  2         304  
4              
5             sub replace_variable {
6 0     0 0   my ($class, $variable) = @_;
7 0           $variable = $class->_replace_home($variable);
8 0           $variable;
9             }
10              
11             sub _replace_home {
12 0     0     my ($class, $variable) = @_;
13 0           $variable =~ s/^~/$ENV{HOME}/;
14 0           $variable;
15             }
16              
17             1;
18              
19             __END__