diff --git a/.gitignore b/.gitignore index d4cb09e..9051e1c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ lib/.precomp/* .precomp/* t/tmp/ + +workspace.xml diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..1a52d03 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..b2dda38 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..67bc904 --- /dev/null +++ b/TODO.md @@ -0,0 +1,5 @@ +# Things to do + +* [ ] File should probably be a distinct object. Right now it's a key and a config, and lots of things are done on it, but it's not clear how to add a new file, for instance. It would be much easier if cached files could be created, compiled and handled in an independent way; that way, it would be easier to add secondary files to the cache. + +* [ ] Once file handling is done, it would be easier to add (or eliminate) files from the cache. diff --git a/lib/Pod/To/Cached.pm6 b/lib/Pod/To/Cached.pm6 index 1ba96d6..951e3e7 100644 --- a/lib/Pod/To/Cached.pm6 +++ b/lib/Pod/To/Cached.pm6 @@ -5,6 +5,8 @@ use nqp; use JSON::Fast; use CompUnit::PrecompilationRepository::Document; +constant @extensions = ; + =begin pod =TITLE Pod::To::Cached @@ -54,7 +56,7 @@ $cache.freeze; path to the collection of pod files ignored if cache frozen -=item @!extensions = +=item constant @extensions = the possible extensions for a POD file =item verbose = False @@ -102,7 +104,7 @@ $cache.freeze; =item pod method pod(Str $source) Returns an array of POD Objects generated from the file associated with $source name. - When a doc-set is being actively updated, then pod files may have failed, in which case they have Status Valid. + When a doc-set is being actively updated, then pod files may have failed, in which case they have C = C. To froze a cache, all files must have Current status =item Status is an enum with the following elements and semantics @@ -124,7 +126,6 @@ enum Status is export ; # New is internally used, has Str $.path = '.pod6-cache'; has Str $.source = 'doc'; -has @.extensions = ; has Bool $.verbose is rw; has $.precomp; has %.files; @@ -333,7 +334,7 @@ method get-pods { #| Recursively finds all pod files @!pods = my sub recurse ($dir) { gather for dir($dir) { - take .Str if .extension ~~ any( @!extensions ); + take .Str if .extension ~~ any( @extensions ); take slip sort recurse $_ if .d; } }($!source); # is the first definition of $dir diff --git a/pod-cached.iml b/pod-cached.iml new file mode 100644 index 0000000..8b2e557 --- /dev/null +++ b/pod-cached.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file