DOKK / manpages / debian 12 / libtypes-uri-perl / Types::URI.3pm.en
Types::URI(3pm) User Contributed Perl Documentation Types::URI(3pm)

Types::URI - type constraints and coercions for URIs

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

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

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:
Coerces to a URI in the "urn:uuid:" schema. (See Types::UUID.)
Uses "new" in URI.
Uses "new" in URI::file. (See Types::Path::Tiny.)
Uses "new" in URI::data.
Coerces using URI::FromHash.
Uses "new" in URI.
Uses "new" in URI.
"FileUri"
A subtype of "Uri" covering URI::file. Coercions from:
Uses "new" in URI::file.
Uses "new" in URI::file. (See Types::Path::Tiny.)
Coerces using URI::FromHash.
Uses "new" in URI.
Uses "new" in URI.
"DataUri"
A subtype of "Uri" covering URI::data. Coercions from:
Uses "new" in URI::data.
Uses "new" in URI::data.
Coerces using URI::FromHash.
Uses "new" in URI.
Uses "new" in URI.
"Iri"
A class type for IRI. Coercions as per "Uri" above, plus can coerce from "Uri".

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

MooseX::Types::URI, Type::Tiny::Manual, URI, URI::file, URI::data, URI::FromHash, RDF::Trine::Node::Resource, IRI.

Types::UUID, Types::Path::Tiny, Types::Standard.

Toby Inkster <tobyink@cpan.org>.

This software is copyright (c) 2014 by Toby Inkster.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

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.

2022-11-29 perl v5.36.0