Types::URI(3pm)

Types::URI3pm

Type constraints and coercions for uris

Usage

   package FroobleDocument;
   
   use Moose;
   use Types::URI -all;
   
   has source => (
      is      => 'ro',
      isa     => Uri,
      coerce  => 1,
   );

Overview

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

Types

This module provides some type constraints broadly compatible with those provided by MooseX::Types::URI, plus a couple of extra type constraints.

"Uri"

A class type for URI/URI::WithBase. Coercions from:

from "Uuid"

Coerces to a URI in the "urn:uuid:" schema. (See Types::UUID.)

from "Str"

Uses "new" in URI.

from "Path"

Uses "new" in URI::file. (See Types::Path::Tiny.)

from "ScalarRef"

Uses "new" in URI::data.

from "HashRef"

Coerces using URI::FromHash.

from "Iri"

Uses "new" in URI.

from RDF::Trine::Node::Resource, RDF::Trine::Namespace, XML::Namespace

Uses "new" in URI.

"FileUri"

A subtype of "Uri" covering URI::file. Coercions from:

from "Str"

Uses "new" in URI::file.

from "Path"

Uses "new" in URI::file. (See Types::Path::Tiny.)

from "HashRef"

Coerces using URI::FromHash.

from "Iri"

Uses "new" in URI.

from RDF::Trine::Node::Resource, RDF::Trine::Namespace, XML::Namespace

Uses "new" in URI.

"DataUri"

A subtype of "Uri" covering URI::data. Coercions from:

from "Str"

Uses "new" in URI::data.

from "ScalarRef"

Uses "new" in URI::data.

from "HashRef"

Coerces using URI::FromHash.

from "Iri"

Uses "new" in URI.

from RDF::Trine::Node::Resource, RDF::Trine::Namespace, XML::Namespace

Uses "new" in URI.

"Iri"

A class type for IRI. Coercions as per "Uri" above, plus can coerce from "Uri".

Disclaimer of warranties

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Releases

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

  1. 8–10
  2. 11
  3. 12–13

Bugs

Please report any bugs to <http://rt.cpan.org/Dist/Display.html?Queue=Types-URI>.

Author

Toby Inkster <[email protected]>.

From libtypes-uri-perl 0.007-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.