Perlito5X/Java/Cwd.pm untested

filter: Statementstmt 0.0% 0 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 12 Podpod 0.0% 0 / 9 totaltotal 0.0% 0 / 46 CC 1 SCAR 6.9
CC
1
Cov
0%
getcwd
2.0
abs_path
2.0
cwd
2.0
CRAP 2.0
1 package Cwd;
2 use strict;
3 use Exporter;
4 use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
5  
6 $VERSION = '3.67';
7  
8 @ISA = qw/ Exporter /;
9 @EXPORT = qw(cwd getcwd fastcwd fastgetcwd);
10 @EXPORT_OK = qw(chdir abs_path fast_abs_path realpath fast_realpath);
11  
12 sub getcwd {
13 return Java::inline("
14 new PlString(PlV.path.toString())
15 ");
16 }
17  
18 sub abs_path {
19 eval {
20 return Java::inline("
21 new PlString(PlV.path.resolve(List__.aget(0).toString()).toRealPath().toString())
22 ");
23 }
24 }
25  
26 sub cwd { getcwd }
27 sub fastcwd { getcwd }
28 sub fastgetcwd { getcwd }
29 sub realpath { &abs_path }
30 sub fast_realpath { &abs_path }
31 sub fast_abs_path { &abs_path }
32 sub chdir {
33 CORE::chdir(@_);
34 $ENV{'PWD'} = getcwd();
35 1;
36 }
37  
38 1;
39  
40 __END__