From: Gerda Shank Date: Fri, 7 May 2010 15:56:45 +0000 (-0400) Subject: avoid uninitialized string warnings X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=b8895ca9cb76e8735b0b8194144a196ebef3d82f;p=chaz%2Fp5-DBIx-Class-ResultSet-RecursiveUpdate avoid uninitialized string warnings --- diff --git a/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm b/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm index 1293af4..6ab316e 100644 --- a/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm +++ b/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm @@ -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')); } }