/[Frey]/branches/mojo/lib/Frey/Types.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /branches/mojo/lib/Frey/Types.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 228 - (show annotations)
Sat Nov 1 13:06:31 2008 UTC (15 years, 7 months ago) by dpavlin
File size: 287 byte(s)
create experimental branch to test Mojo as server instead of Continuity
1 package Frey::Types;
2 use Moose::Util::TypeConstraints;
3
4 use URI ();
5
6 subtype 'Uri'
7 => as 'Object'
8 => where { $_->isa('URI') };
9
10 coerce 'Uri'
11 => from 'Object'
12 => via { $_->isa('URI')
13 ? $_
14 : Params::Coerce::coerce( 'URI', $_ ) }
15 => from 'Str'
16 => via { URI->new( $_ ) };
17
18 1;

  ViewVC Help
Powered by ViewVC 1.1.26