Skip to content

CPAN

NORA acts as a caching proxy for CPAN. Distribution tarballs are cached immutably; the package index files use TTL-based refresh. This is a proxy-only registry — uploading distributions through NORA is not supported.

Point cpanm at NORA:

Terminal window
cpanm --from http://nora.example.com:4000/cpan Module::Name

--from makes NORA the only mirror, so module lookups and downloads both go through it.

config.toml:

[cpan]
enabled = true
proxy = "https://www.cpan.org"
proxy_timeout = 30
metadata_ttl = 300 # seconds
serve_stale = true

Environment variables:

VariableDescriptionDefault
NORA_CPAN_ENABLEDEnable the CPAN proxyfalse
NORA_CPAN_PROXYUpstream CPAN mirror URLhttps://www.cpan.org
NORA_CPAN_PROXY_AUTHUpstream auth (user:pass)—
NORA_CPAN_PROXY_TIMEOUTUpstream timeout in seconds30
NORA_CPAN_METADATA_TTLIndex cache TTL in seconds300
NORA_CPAN_SERVE_STALEServe a stale cached copy when the upstream is unreachabletrue
FeatureStatusNotes
Package index (modules/02packages.details.txt.gz)FullTTL-cached
Module list (modules/03modlist.data.gz)FullTTL-cached
Author directory (authors/01mailrc.txt.gz)FullTTL-cached
Distribution download (authors/id/…)FullImmutable cache
Stale cache on upstream failureFullx-nora-stale: true
Distribution upload—Proxy-only (read)
  • Proxy-only: uploading distributions is not supported (PUT answers 405).
  • The web UI groups cached releases by their archive file names; a name it cannot parse is left out of the grouped author view.
  • Disabled by default. Set NORA_CPAN_ENABLED=true to activate.