blib/lib/ExtUtils/Helpers/Windows.pm untested

filter: Statementstmt 0.0% 0 / 28 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 45 CC 3 SCAR 12.8
CC
3
Cov
0%
make_executable
6.0
detildefy
6.0
BEGIN
2.0
CRAP 3.6
1 package ExtUtils::Helpers::Windows;
2 $ExtUtils::Helpers::Windows::VERSION = '0.025';
3 use strict;
4 use warnings FATAL => 'all';
5  
6 use Exporter 5.57 'import';
7 our @EXPORT = qw/make_executable detildefy/;
8  
9 use Config;
10 use Carp qw/carp croak/;
11 use ExtUtils::PL2Bat 'pl2bat';
12  
13 sub make_executable {
14 my $script = shift;
15 if (-T $script && $script !~ / \. (?:bat|cmd) $ /x) {
16 pl2bat(in => $script, update => 1);
17 }
18 return;
19 }
20  
21 sub detildefy {
22 my $value = shift;
23 $value =~ s{ ^ ~ (?= [/\\] | $ ) }[$ENV{USERPROFILE}]x if $ENV{USERPROFILE};
24 return $value;
25 }
26  
27 1;
28  
29 # ABSTRACT: Windows specific helper bits
30  
31 __END__