[Bps-public-commit] r12467 - in Prophet/branches/moose: .

sartak at bestpractical.com sartak at bestpractical.com
Sat May 17 06:54:09 EDT 2008


Author: sartak
Date: Sat May 17 06:54:08 2008
New Revision: 12467

Modified:
   Prophet/branches/moose/   (props changed)
   Prophet/branches/moose/lib/Prophet/ConflictingChange.pm

Log:
 r56201 at onn:  sartak | 2008-05-17 06:53:48 -0400
 Moosifify ConflictingChange part 1


Modified: Prophet/branches/moose/lib/Prophet/ConflictingChange.pm
==============================================================================
--- Prophet/branches/moose/lib/Prophet/ConflictingChange.pm	(original)
+++ Prophet/branches/moose/lib/Prophet/ConflictingChange.pm	Sat May 17 06:54:08 2008
@@ -1,15 +1,39 @@
-use warnings;
-use strict;
-
 package Prophet::ConflictingChange;
+use Moose;
+use Prophet::Meta::Types;
 use Prophet::ConflictingPropChange;
-
-use base qw/Class::Accessor/;
-use JSON qw'to_json';
+use JSON 'to_json';
 use Digest::SHA1 'sha1_hex';
 
-# change_type is one of: add_file add_dir update delete
-__PACKAGE__->mk_accessors(qw/record_type record_uuid source_record_exists target_record_exists change_type file_op_conflict/);
+has record_type => (
+    is  => 'rw',
+    isa => 'Str',
+);
+
+has record_uuid => (
+    is  => 'rw',
+    isa => 'Str',
+);
+
+has source_record_exists => (
+    is  => 'rw',
+    isa => 'Bool',
+);
+
+has target_record_exists => (
+    is  => 'rw',
+    isa => 'Bool',
+);
+
+has change_type => (
+    is  => 'rw',
+    isa => 'Prophet::Type::ChangeType',
+);
+
+has file_op_conflict => (
+    is  => 'rw',
+    isa => 'Prophet::Type::FileOpConflict',
+);
 
 =head2 prop_conflicts
 
@@ -56,7 +80,9 @@
     }
 
     return  sha1_hex(to_json($struct, {utf8 => 1, canonical => 1}));
+}
 
+__PACKAGE__->meta->make_immutable;
+no Moose;
 
-}
 1;



More information about the Bps-public-commit mailing list