]> Dogcows Code - chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate/commitdiff
avoid uninitialized string warnings
authorGerda Shank <gerda.shank@gmail.com>
Fri, 7 May 2010 15:56:45 +0000 (11:56 -0400)
committerGerda Shank <gerda.shank@gmail.com>
Fri, 7 May 2010 15:56:45 +0000 (11:56 -0400)
lib/DBIx/Class/ResultSet/RecursiveUpdate.pm

index 1293af495e7f10e18cd2a391bf3580e56043dcd9..6ab316eb81a311fe947c548a1a4a6bd164c66815 100644 (file)
@@ -214,10 +214,10 @@ sub _update_relation {
         }
         elsif( ! ref $sub_updates ){
             $sub_object = $related_result->find( $sub_updates ) 
-                unless (!$sub_updates && ($info->{attrs}{join_type} eq 'LEFT'));
+                unless (!$sub_updates && (exists $info->{attrs}{join_type} && $info->{attrs}{join_type} eq 'LEFT'));
         }
         $object->set_from_related( $name, $sub_object )
-          unless (!$sub_object && !$sub_updates && ($info->{attrs}{join_type} eq 'LEFT'));
+          unless (!$sub_object && !$sub_updates && (exists $info->{attrs}{join_type} && $info->{attrs}{join_type} eq 'LEFT'));
     }
 }
 
This page took 0.026459 seconds and 4 git commands to generate.