logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Author

       יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>

Contributors

       •   Karen Etheridge <ether@cpan.org>

       •   Florian Ragwitz <rafl@debian.org>

       •   Olivier Mengué <dolmen@cpan.org>

       •   Daniel Pittman <daniel@rimspace.net>

       •   MORIYA Masaki (gardejo) <moriya@ermitejo.com>

       •   Shawn M Moore <sartak@gmail.com>

Description

       This package provides Moose types for fun with URIs.

Name

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

Support

       Bugs may be submitted through the RT bug tracker
       <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Types-URI> (or bug-MooseX-Types-URI@rt.cpan.org
       <mailto:bug-MooseX-Types-URI@rt.cpan.org>).

       There is also a mailing list available for users of this distribution, at
       <http://lists.perl.org/list/moose.html>.

       There is also an irc channel available for users of this distribution, at "#moose" on "irc.perl.org"
       <irc://irc.perl.org/#moose>.

Synopsis

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

Todo

       Think about Path::Resource integration of some sort

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 (but only if
       MooseX::Types::Path::Class is installed)

       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" (and optionally Path::Class::File and Path::Class::Dir) via "new" in URI::file

       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).

Version

       version 0.10

See Also