diff options
author | Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com> | 2013-11-07 11:32:13 +0000 |
---|---|---|
committer | Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com> | 2013-11-07 12:06:25 +0000 |
commit | 022152630a9084fbc604f0d06b0005d97747b50d (patch) | |
tree | 8fa95f6ee8c70615a140519b93671a3e11376249 /lib/Types/URI.pm | |
parent | exclude "sources" in forecast call (diff) | |
download | HomePanel-022152630a9084fbc604f0d06b0005d97747b50d.tar.gz HomePanel-022152630a9084fbc604f0d06b0005d97747b50d.tar.bz2 HomePanel-022152630a9084fbc604f0d06b0005d97747b50d.zip |
migrate to Moo: forecast client
Diffstat (limited to 'lib/Types/URI.pm')
-rw-r--r-- | lib/Types/URI.pm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Types/URI.pm b/lib/Types/URI.pm new file mode 100644 index 0000000..0bb4ae5 --- /dev/null +++ b/lib/Types/URI.pm @@ -0,0 +1,15 @@ +package Types::URI; +use strict; +use warnings; +use namespace::autoclean; +use Type::Library -base, -declare => 'Uri'; +use Type::Utils -all; +use Types::Standard -types; + +class_type Uri, { class => 'URI' }; +coerce Uri, from Str, via { + require URI; + URI->new($_); +}; + +1; |