[Bps-public-commit] r16955 - sd/trunk/lib/App/SD/ForeignReplica

ruz at bestpractical.com ruz at bestpractical.com
Thu Nov 20 12:08:06 EST 2008


Author: ruz
Date: Thu Nov 20 12:08:06 2008
New Revision: 16955

Modified:
   sd/trunk/lib/App/SD/ForeignReplica/PullEncoder.pm

Log:
* fix uninit warnings

Modified: sd/trunk/lib/App/SD/ForeignReplica/PullEncoder.pm
==============================================================================
--- sd/trunk/lib/App/SD/ForeignReplica/PullEncoder.pm	(original)
+++ sd/trunk/lib/App/SD/ForeignReplica/PullEncoder.pm	Thu Nov 20 12:08:06 2008
@@ -2,12 +2,13 @@
 use Moose;
 
 sub warp_list_to_old_value {
-    my $self         = shift;
-    my $current_value = shift ||'';
-    my $add          = shift;
-    my $del          = shift;
+    my $self    = shift;
+    my $current = shift;
+    my $add     = shift;
+    my $del     = shift;
+    $_ = '' foreach grep !defined, $current, $add, $del;
 
-    my @new = grep defined && length, split /\s*,\s*/, $current_value;
+    my @new = grep defined && length, split /\s*,\s*/, $current;
     my @old = grep defined && length && $_ ne $add, (@new, $del);
     return join( ", ", @old );
 }



More information about the Bps-public-commit mailing list