Skip to main content

PURL Type Definition: cpan

  • Type Name: CPAN
  • Description: Perl package distributions published on CPAN
  • Schema ID: https://packageurl.org/types/cpan-definition.json

PURL Syntax​

The structure of a PURL for this package type is:

pkg:cpan/<namespace>/<name>@<version>?<qualifiers>#<subpath>

Repository Information​

Namespace definition​

  • Requirement: Optional
  • Native Label: CPAN author/publisher ID (CPANID)
  • Note: When present, it represents the CPAN author/publisher ID (CPANID) and shall be uppercase. It is appropriate to use 'namespace' for compatibility with existing CPAN purl producers/consumers or when a workflow explicitly requires author-scoped identifiers. For new identifiers, the 'author' qualifier is the preferred way to specify the author/publisher. When 'version' is omitted, author scoping via 'namespace' may be ambiguous because a distribution can change maintainers over time.

Name definition​

  • Requirement: Required
  • Case Sensitive: Yes
  • Native Label: distribution name
  • Note: The name is the distribution name and is case sensitive. A distribution name shall not contain the string '::'

Version definition​

  • Requirement: Optional
  • Native Label: version
  • Note: The version is the distribution version

Qualifiers Definition​

KeyRequirementNative nameDefault ValueDescription
authorOptionalCPAN author/publisher ID (CPANID)
distpathOptionalRepository-relative path (not a URL) to the distribution archive or directory, typically under 'authors/id/...'
repository_urlOptionalCPAN/MetaCPAN/BackPAN/DarkPAN repository base URL
download_urlOptionalURL of package or distribution
vcs_urlOptionalextra URL for a package version control system
extOptionaltar.gzdistribution file extension

Examples​

  • pkg:cpan/perl@5.42
  • pkg:cpan/DBI@1.646
  • pkg:cpan/SBOM-CycloneDX
  • pkg:cpan/URI-PackageURL?author=GDT
  • pkg:cpan/libwww-perl@6.76?author=OALDERS
  • pkg:cpan/DateTime@1.55?author=DROLSKY&repository_url=backpan.perl.org
  • pkg:cpan/Term-Gnuplot@0.90380906?distpath=authors%2Fid%2FI%2FIL%2FILYAZ%2Fmodules%2FTerm-Gnuplot-0.90380906.zip

Note​

The PURL 'name' shall be the CPAN distribution name (case sensitive) and shall not contain the '::' separator (module name). The CPAN author/publisher ID (CPANID) is OPTIONAL: when needed, it should be provided using the 'author' qualifier. The PURL 'namespace' is OPTIONAL and, when present, represents the CPANID and shall be uppercase; it may be used for compatibility with existing identifiers or tooling. When PURL 'version' is omitted, author scoping (via 'author' qualifier or 'namespace') may be ambiguous because a distribution can change maintainers over time.