Skip to content

Commit d49e1fa

Browse files
committed
Eliminates nqp from test
Adds some documentation, closes#4
1 parent 173065c commit d49e1fa

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

‎lib/CompUnit/PrecompilationRepository/Document.pm6‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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
2223
methodnew( $doc-path ){
2324
init() unless$precomp-store;
2425
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;
2727
self.bless(
2828
doc-path =>$this-path,
2929
doc-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
4142
methodkey(){
4243
$!key
4344
}
4445

46+
# Returns the precompiled pod
4547
methodprecompiled-pod(){$!precompiled-pod }
4648

4749
#! Provides a key for the document with that particular name

‎t/007-load-precompile.t‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use v6.c;
33
useTest;
44
use CompUnit::PrecompilationRepository::Document;
55
use File::Directory::Tree;
6-
usenqp;
76

87
constant cache-name ="cache";
98
init( cache-name );

0 commit comments

Comments
(0)