MooseX::Types::URI.3pm

Langue: en

Autres versions - même langue

Version: 2009-05-27 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

MooseX::Types::URI - URI related types and coercions for Moose

SYNOPSIS

         use MooseX::Types::URI qw(Uri FileUri DataUri);
 
 

DESCRIPTION

This package provides Moose types for fun with URIs.

It has slightly DWIMier types than the URI classes have due to implementation details, so the types should be more forgiving when ducktyping will work anyway (e.g. URI::WithBase does not inherit URI).

TYPES

The types are with "ucfirst" naming convention so that they don't mask the URI class.
Uri
Either URI or URI::WithBase

Coerces from "Str" via ``new'' in URI.

Coerces from Path::Class::File and Path::Class::Dir via ``new'' in URI::file.

Coerces from "ScalarRef" via ``new'' in URI::data.

Coerces from "HashRef" using URI::FromHash.

DataUri
A URI whose scheme is "data".

Coerces from "Str" and "ScalarRef" via ``new'' in URI::data.

FileUri
A URI::file class type.

Has coercions from "Str", Path::Class::File and Path::Class::Dir via ``new'' in URI::file

TODO

Think about Path::Resource integration of some sort

VERSION CONTROL

http://github.com/nothingmuch/moosex-types-uri/ <http://github.com/nothingmuch/moosex-types-uri/>

AUTHOR

Yuval Kogman <nothingmuch@woobling.org>
         Copyright (c) 2008 Yuval Kogman. All rights reserved
         This program is free software; you can redistribute
         it and/or modify it under the same terms as Perl itself.