{"id":14966126,"url":"https://github.com/finanalyst/pod-cached","last_synced_at":"2026-01-03T18:49:57.184Z","repository":{"id":80341201,"uuid":"153637234","full_name":"finanalyst/pod-cached","owner":"finanalyst","description":"Perl6 module to create and maintain a cache of a collection of pod files.","archived":false,"fork":false,"pushed_at":"2020-06-13T12:22:47.000Z","size":137,"stargazers_count":2,"open_issues_count":7,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T12:13:17.733Z","etag":null,"topics":["perl6","pod6","precompilation"],"latest_commit_sha":null,"homepage":null,"language":"Perl 6","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/finanalyst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-18T14:25:56.000Z","updated_at":"2019-08-10T09:26:58.000Z","dependencies_parsed_at":"2023-06-05T21:30:49.142Z","dependency_job_id":null,"html_url":"https://github.com/finanalyst/pod-cached","commit_stats":{"total_commits":81,"total_committers":3,"mean_commits":27.0,"dds":"0.41975308641975306","last_synced_commit":"4693592a8c6f75db7c29f13b2ed8b249b697e7e9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finanalyst%2Fpod-cached","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finanalyst%2Fpod-cached/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finanalyst%2Fpod-cached/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finanalyst%2Fpod-cached/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/finanalyst","download_url":"https://codeload.github.com/finanalyst/pod-cached/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238147594,"owners_count":19424291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["perl6","pod6","precompilation"],"created_at":"2024-09-24T13:35:51.564Z","updated_at":"2025-10-25T13:31:13.472Z","avatar_url":"https://github.com/finanalyst.png","language":"Perl 6","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pod::To::Cached\n\nCreate and Maintain a cache of precompiled pod files\n\nModule to take a collection of pod files and create a precompiled cache. Methods / functions\nto add a pod file to a cache.\n\n## Install\n\nThis module is in the [Perl 6 ecosystem](https://modules.perl6.org), so you install it in the usual way:\n\n    zef install Pod::To::Cached\n\n\n# SYNOPSIS\n```perl6\nuse Pod::To::Cached;\n\nmy Pod::To::Cached $cache .= new(:path\u003cpath-to-cache\u003e, :source\u003cpath-to-directory-with-pod-files\u003e);\n\n$cache.update-cache;\n\nfor $cache.hash-files.kv -\u003e $source-name, $status {\n    given $status {\n        when 'Current' {say \"｢$source-name｣ is up to date with POD source\"}\n        when 'Valid' {say \"｢$source-name｣ has valid POD, but newer POD source contains invalid POD\"}\n        when 'Failed' {say \"｢$source-name｣ is not in cache, and source file contains invalid POD\"}\n        when 'New' { say \"｢$source-name｣ is not in cache and cache has not been updated\"}\n        when 'Old' { say \"｢$source-name｣ is in cache, but has no associated pod file in DOC\"}\n    }\n    user-supplied-routine-for-processing-pod( $cache.pod( $source-name ) );\n}\n\n# Find files with status\nsay 'These pod files failed:';\n.say for $cache.list-files( 'Failed' );\nsay 'These sources have valid pod:';\n.say for $cache.list-files(\u003cCurrent Valid\u003e);\n\n# Find date when pod added to cache\nmy $source = 'language/pod'; # name of a documentation source\nsay \"｢$source｣ was added on ｢{ $cache.cache-timestamp( $source ) }｣\";\n\n# Remove the dependence on the pod source\n$cache.freeze;\n\n```\n## Notes\n-  Str $!path = '.pod6-cache'  \n    path to the directory where the cache will be created/kept\n\n-  Str $!source = 'doc'  \n    path to the collection of pod files\n    ignored if cache frozen\n\n-  @!extensions = \u003cpod pod6\u003e  \n    the possible extensions for a POD file\n\n-  verbose = False  \n    Whether processing information is sent to stderr.\n\n-  new  \n    Instantiates class. On instantiation,\n    - get the cache from index, or creates a new cache if one does not exist\n    - if frozen, does not check the source directory\n    - if not frozen, or new cache being created, verifies\n        - source directory exists\n        - the source directory contains POD/POD6 etc files (recursively)\n        - no duplicate pod file names exist, eg. xx.pod \u0026 xx.pod6\n    - verifies whether the cache is valid\n\n-  update-cache  \n    All files with a modified timestamp (reported by the filesystem) after the added instant are precompiled and added to the cache\n    - Status is changed to Updated (compiles Valid) or Fail (does not compile)\n    - Failed files that were previously Valid files still retain the old cache handle\n    - Throws an exception when called on a frozen cache\n\n-  freeze  \n    Can be called only when there are only Valid or Updated (no New, Tainted or Failed files),\n    otherwise dies.  \n    The intent of this method is to allow the pod-cache to be copied without the original pod-files.  \n    update-cache will throw an error if used on a frozen cache\n\n-  list-files( Str $s --\u003e Positional )\n    returns an Sequence of files with the given status\n\n-  list-files( Str $s1, $s2 --\u003e Positional )\n    returns an Array of files with the given status list\n\n-  hash-files( *@statuses? --\u003e Associative )\n    returns a map of the source-name and its statuses\n    -  explicitly give required status strings: C\u003c\u003c $cache.hash-files(\u003cOld Failed\u003e) \u003e\u003e\n    -  return all files C\u003c $cache.hash-files \u003e\n\n-  cache-timestamp( $source --\u003e Instant )\n    returns the Instant when a valid version of the Pod was added to the cache\n    -  if the time-stamp is before the time the Pod was modified, then the pod has errors\n    -  a Failed source has a timestamp of zero\n\n-  pod\n    - method pod(Str $source)\n    - Returns an array of POD Objects generated from the file associated with $source name.\n    - When a doc-set is being actively updated, then pod files may have failed, in which case they have Status Valid.\n    - To froze a cache, all files must have Current status\n\n-  Status is an enum with the following elements and semantics\n    -  Current  \n         There is a compiled source in the cache with an added date **after** the modified date\n    -  Valid  \n    There is a compiled source in the cache with an added date **before** the modified date and there has been an attempt to add the source to cache that did not compile\n    -  Failed  \n    There is not a compiled source in the cache, but there has been an attempt to add the source name to the cache that did not compile\n    -  New  \n    A new pod source has been detected that is not in cache, but C\u003cupdate-cache\u003e has not yet been called to compile the source. A transitional Status\n    -  Old  \n    A source name that is in the cache but no longer reflects an existing source.\n\n## LICENSE\n\nYou can use and distribute this module under the terms of the The Artistic License 2.0. See the LICENSE file included in this distribution for complete details.\n\nThe META6.json file of this distribution may be distributed and modified without restrictions or attribution.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinanalyst%2Fpod-cached","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinanalyst%2Fpod-cached","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinanalyst%2Fpod-cached/lists"}