[Bps-public-commit] Prophet branch, master, updated. caef981ec86f5719d3adfc15648335896d20c434

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Jun 22 21:03:08 EDT 2009


The branch, master has been updated
       via  caef981ec86f5719d3adfc15648335896d20c434 (commit)
       via  b9680355a4f613949e658a05a73b8f6472dfbbf3 (commit)
      from  0f370eb940e9b22c1e178a6952658d0bbfc8193d (commit)

Summary of changes:
 lib/Prophet/Conflict.pm |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit b9680355a4f613949e658a05a73b8f6472dfbbf3
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Jun 23 09:02:19 2009 +0800

    refactor a tiny bit

diff --git a/lib/Prophet/Conflict.pm b/lib/Prophet/Conflict.pm
index 57814ad..af20fc3 100644
--- a/lib/Prophet/Conflict.pm
+++ b/lib/Prophet/Conflict.pm
@@ -201,10 +201,18 @@ sub _generate_prop_change_conflicts {
             source_new_value => $prop_change->new_value
         };
 
-        my $old_exists = defined $prop_change->old_value && $prop_change->old_value ne '';
-
+        my $old_exists =
+          ( defined $prop_change->old_value && $prop_change->old_value ne '' )
+          ? 1
+          : 0;
+        my $current_exists =
+          exists $current_state->{ $prop_change->name }
+          ? 1
+          : 0;
+
+        no warnings 'uninitialized';
         if ( 
-               ((exists $current_state->{ $prop_change->name }) != $old_exists)
+               (  $current_exists != $old_exists)
             || ( $current_state->{ $prop_change->name } ne $prop_change->old_value ) )
         {
             push @prop_conflicts, Prophet::ConflictingPropChange->new($s);

commit caef981ec86f5719d3adfc15648335896d20c434
Merge: b968035... 0f370eb...
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Jun 23 09:02:38 2009 +0800

    Merge branch 'master' of code.bestpractical.com:/git/prophet


-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list