/[Frey]/trunk/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

Annotation of /trunk/lib/Frey/Types.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 174 - (hide annotations)
Sat Aug 16 13:03:44 2008 UTC (15 years, 9 months ago) by dpavlin
File size: 287 byte(s)
split types in own package, and added note about redundant
code with MooseX::Types::URI (which I can't use correctly it seems)
1 dpavlin 174 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