[Bps-public-commit] r12465 - in Prophet/branches/moose: . lib/Prophet/Meta

sartak at bestpractical.com sartak at bestpractical.com
Sat May 17 06:31:27 EDT 2008


Author: sartak
Date: Sat May 17 06:31:27 2008
New Revision: 12465

Added:
   Prophet/branches/moose/lib/Prophet/Meta/
   Prophet/branches/moose/lib/Prophet/Meta/Types.pm
Modified:
   Prophet/branches/moose/   (props changed)
   Prophet/branches/moose/lib/Prophet/Change.pm

Log:
 r56198 at onn:  sartak | 2008-05-17 06:31:23 -0400
 Add Prophet::Meta::Types and the ChangeType type


Modified: Prophet/branches/moose/lib/Prophet/Change.pm
==============================================================================
--- Prophet/branches/moose/lib/Prophet/Change.pm	(original)
+++ Prophet/branches/moose/lib/Prophet/Change.pm	Sat May 17 06:31:27 2008
@@ -1,6 +1,6 @@
 package Prophet::Change;
 use Moose;
-use Moose::Util::TypeConstraints;
+use Prophet::Meta::Types;
 use MooseX::AttributeHelpers;
 use Prophet::PropChange;
 use Params::Validate;
@@ -17,7 +17,7 @@
 
 has change_type => (
     is  => 'rw',
-    isa => enum([qw/add_file add_dir update_file delete/]),
+    isa => 'Prophet::Type::ChangeType',
 );
 
 has resolution_cas => (
@@ -139,6 +139,5 @@
 
 __PACKAGE__->meta->make_immutable;
 no Moose;
-no Moose::Util::TypeConstraints;
 
 1;

Added: Prophet/branches/moose/lib/Prophet/Meta/Types.pm
==============================================================================
--- (empty file)
+++ Prophet/branches/moose/lib/Prophet/Meta/Types.pm	Sat May 17 06:31:27 2008
@@ -0,0 +1,24 @@
+use strict;
+use warnings;
+
+package Prophet::Meta::Types;
+use Moose::Util::TypeConstraints;
+
+enum 'Prophet::Type::ChangeType' => qw/add_file add_dir update_file delete/;
+
+1;
+
+__END__
+
+=head1 NAME
+
+Prophet::Meta::Types - extra types for Prophet
+
+=head1 TYPES
+
+=head2 Prophet::Type::ChangeType
+
+A single change type: add_file, add_dir, update_file, delete.
+
+=cut
+



More information about the Bps-public-commit mailing list