[Bps-public-commit] r12464 - in Prophet/branches/moose: .
sartak at bestpractical.com
sartak at bestpractical.com
Sat May 17 06:26:13 EDT 2008
Author: sartak
Date: Sat May 17 06:26:13 2008
New Revision: 12464
Modified:
Prophet/branches/moose/ (props changed)
Prophet/branches/moose/lib/Prophet/Conflict.pm
Log:
r56196 at onn: sartak | 2008-05-17 06:26:09 -0400
Moosify Prophet::Conflict
Modified: Prophet/branches/moose/lib/Prophet/Conflict.pm
==============================================================================
--- Prophet/branches/moose/lib/Prophet/Conflict.pm (original)
+++ Prophet/branches/moose/lib/Prophet/Conflict.pm Sat May 17 06:26:13 2008
@@ -1,15 +1,40 @@
-
-use warnings;
-use strict;
-
package Prophet::Conflict;
+use Moose;
use Params::Validate;
-use base qw/Class::Accessor/;
use Prophet::ConflictingPropChange;
use Prophet::ConflictingChange;
-__PACKAGE__->mk_accessors(
- qw/prophet_handle resolvers changeset nullification_changeset resolution_changeset autoresolved/);
+has prophet_handle => (
+ is => 'rw',
+ isa => 'Prophet::Replica',
+);
+
+has resolvers => (
+ is => 'rw',
+ isa => 'ArrayRef[CodeRef]',
+ default => sub { [] },
+ auto_deref => 1,
+);
+
+has changeset => (
+ is => 'rw',
+ isa => 'Prophet::ChangeSet',
+);
+
+has nullification_changeset => (
+ is => 'rw',
+ isa => 'Prophet::ChangeSet',
+);
+
+has resolution_changeset => (
+ is => 'rw',
+ isa => 'Prophet::ChangeSet',
+);
+
+has autoresolved => (
+ is => 'rw',
+ isa => 'Bool',
+);
=head2 analyze_changeset Prophet::ChangeSet
@@ -42,7 +67,7 @@
my @resolvers = (
sub { Prophet::Resolver::IdenticalChanges->new->run(@_); },
$resdb ? sub { Prophet::Resolver::FromResolutionDB->new->run(@_) } : (),
- @{ $self->resolvers || [] },
+ $self->resolvers,
sub { Prophet::Resolver::Failed->new->run(@_) },
);
my $resolutions = Prophet::ChangeSet->new( { is_resolution => 1 } );
@@ -214,5 +239,8 @@
$self->nullification_changeset($nullification);
}
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
1;
More information about the Bps-public-commit
mailing list