Types::URI - type constraints and coercions for URIs
package FroobleDocument;
use Moose;
use Types::URI -all;
has source => (
is => 'ro',
isa => Uri,
coerce => 1,
);
the Types::URI manpage 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 the MooseX::Types::URI manpage, plus a couple of extra type
constraints.
- Uri
-
A class type for URI/the URI::WithBase manpage. Coercions from:
- from Uuid
-
Coerces to a URI in the
urn:uuid: schema. (See the Types::UUID manpage.)
- from Str
-
Uses URI/new.
- from Path
-
Uses new in the URI::file manpage. (See the Types::Path::Tiny manpage.)
- from ScalarRef
-
Uses new in the URI::data manpage.
- from HashRef
-
Coerces using the URI::FromHash manpage.
- from Iri
-
Uses URI/new.
- from RDF::Trine::Node::Resource, RDF::Trine::Namespace, XML::Namespace
-
Uses URI/new.
- FileUri
-
A subtype of
Uri covering the URI::file manpage. Coercions from:
- from
Str from Str
-
Uses new in the URI::file manpage.
- from
Path from Path
-
Uses new in the URI::file manpage. (See the Types::Path::Tiny manpage.)
- from
HashRef from HashRef
-
Coerces using the URI::FromHash manpage.
- from
Iri from Iri
-
Uses URI/new.
- from the RDF::Trine::Node::Resource manpage, the RDF::Trine::Namespace manpage, the XML::Namespace manpagefrom RDF::Trine::Node::Resource, RDF::Trine::Namespace, XML::Namespace
-
Uses URI/new.
- DataUri
-
A subtype of
Uri covering the URI::data manpage. Coercions from:
- from
Str from Str
-
Uses new in the URI::data manpage.
- from
ScalarRef from ScalarRef
-
Uses new in the URI::data manpage.
- from
HashRef from HashRef
-
Coerces using the URI::FromHash manpage.
- from
Iri from Iri
-
Uses URI/new.
- from the RDF::Trine::Node::Resource manpage, the RDF::Trine::Namespace manpage, the XML::Namespace manpagefrom RDF::Trine::Node::Resource, RDF::Trine::Namespace, XML::Namespace
-
Uses URI/new.
- 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.
the MooseX::Types::URI manpage,
the Type::Tiny::Manual manpage,
URI,
the URI::file manpage,
the URI::data manpage,
the URI::FromHash manpage,
the RDF::Trine::Node::Resource manpage,
IRI.
the Types::UUID manpage,
the Types::Path::Tiny manpage,
the Types::Standard manpage.
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.
|