File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
lib/CompUnit/PrecompilationRepository Expand file tree Collapse file tree 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
1919 );
2020 }
2121
22+ # ! Initializes object with a document path, will fail if it does not exist
2223method new ( $ doc-path ){
2324 init() unless $ precomp-store ;
2425my $ 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 ;
2727self . bless (
2828doc-path => $ this-path ,
2929doc-name => $ doc-name ,
@@ -38,10 +38,12 @@ class CompUnit::PrecompilationRepository::Document is CompUnit::PrecompilationRe
3838$ ! precompiled-pod = nqp ::atkey($ ! handle . unit,' $=pod' )[0 ];
3939 }
4040
41+ # Returns the cache key, mainly for testing purposes
4142method key (){
4243$ ! key
4344 }
4445
46+ # Returns the precompiled pod
4547method precompiled-pod (){$ ! precompiled-pod }
4648
4749# ! 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;
33use Test ;
44use CompUnit::PrecompilationRepository::Document;
55use File::Directory::Tree;
6- use nqp ;
76
87constant cache-name = " cache" ;
98init( cache-name );
You can’t perform that action at this time.
0 commit comments