File tree 2 files changed +4
-3
lines changed
lib/CompUnit/PrecompilationRepository
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,11 @@ class CompUnit::PrecompilationRepository::Document is CompUnit::PrecompilationRe
19
19
);
20
20
}
21
21
22
+ # ! Initializes object with a document path, will fail if it does not exist
22
23
method new ( $ doc-path ) {
23
24
init() unless $ precomp-store ;
24
25
my $ this-path = IO ::Path. new ( $ doc-path );
25
- fail (" Path $ this-path not found" ) if ! $ this-path . e ;
26
- my $ doc-name = $ this-path . basename ;
26
+ fail (" Path $ this-path not found" ) if ! $ this-path . e ; my $ doc-name = $ this-path . basename ;
27
27
self . bless (
28
28
doc-path => $ this-path ,
29
29
doc-name => $ doc-name ,
@@ -38,10 +38,12 @@ class CompUnit::PrecompilationRepository::Document is CompUnit::PrecompilationRe
38
38
$ ! precompiled-pod = nqp ::atkey($ ! handle . unit,' $=pod' )[0 ];
39
39
}
40
40
41
+ # Returns the cache key, mainly for testing purposes
41
42
method key () {
42
43
$ ! key
43
44
}
44
45
46
+ # Returns the precompiled pod
45
47
method precompiled-pod () { $ ! precompiled-pod }
46
48
47
49
# ! Provides a key for the document with that particular name
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ use v6.c;
3
3
use Test ;
4
4
use CompUnit::PrecompilationRepository::Document;
5
5
use File::Directory::Tree;
6
- use nqp ;
7
6
8
7
constant cache-name = " cache" ;
9
8
init( cache-name );
You can’t perform that action at this time.
0 commit comments