MooseX::Types::URI - URI related types and coercions for Moose
use MooseX::Types::URI qw(Uri FileUri DataUri);
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).
The types are with ucfirst naming convention so that they don't mask the URI class.
ucfirst
Either URI or URI::WithBase
Coerces from Str via "new" in URI.
Str
Coerces from Path::Class::File and Path::Class::Dir via "new" in URI::file.
Coerces from ScalarRef via "new" in URI::data.
ScalarRef
Coerces from HashRef using URI::FromHash.
HashRef
A URI whose scheme is data.
data
Coerces from Str and ScalarRef via "new" in URI::data.
A URI::file class type.
Has coercions from Str, Path::Class::File and Path::Class::Dir via "new" in URI::file
Think about Path::Resource integration of some sort
http://code2.0beta.co.uk/moose/svn/. Ask on #moose for commit bits.
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.
To install MooseX::Types::URI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooseX::Types::URI
CPAN shell
perl -MCPAN -e shell install MooseX::Types::URI
For more information on module installation, please visit the detailed CPAN module installation guide.