Types::Namespace(3pm)

Types::Namespace3pm

Type constraints for dealing with namespaces

Usage

  package Namespace::Counter {
    use Moo;  # or Moose
    use Types::Namespace qw( Namespace );
    has ns => (
      is => "ro",
      isa => Namespace,
      required => 1,
    );
    sub count_uses_in_document { ... }
  }

Overview

Types::Namespace is a type constraint library suitable for use with Moo/Moose attributes, Kavorka sub signatures, and so forth. It builds on Types::URI.

Types

"Namespace"

A class type for URI::Namespace.

Can coerce from URI, IRI, Path::Tiny, Attean::IRI, RDF::Trine::Namespace, RDF::Trine::Node::Resource and strings.

"NamespaceMap"

A class type for URI::NamespaceMap.

Can coerce from a hashref of "prefix => URI" pairs and from RDF::Trine::NamespaceMap.

"Uri", "Iri"

These namespaces are re-exported from Types::URI, but with an additional coercion from the "Namespace" type.

Further details

See URI::NamespaceMap for further details about authors, license, etc.

Releases

6 releases since Debian 8 (Jessie); the text changed 5 times.

  1. 8
  2. 9
  3. 10
  4. 11
  5. 12
  6. 13

From liburi-namespacemap-perl 1.12-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.