From: Mike Taylor Date: Fri, 30 Mar 2007 09:50:55 +0000 (+0000) Subject: Do not attempt to delete old record if $oldid is undefined! X-Git-Tag: CPAN-v1.02~54^2~443 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=14e22b2427415b5f2166d0fe502306fbe2455be1;p=irspy-moved-to-github.git Do not attempt to delete old record if $oldid is undefined! --- diff --git a/lib/ZOOM/IRSpy.pm b/lib/ZOOM/IRSpy.pm index c4bae34..0ce0317 100644 --- a/lib/ZOOM/IRSpy.pm +++ b/lib/ZOOM/IRSpy.pm @@ -1,4 +1,4 @@ -# $Id: IRSpy.pm,v 1.79 2007-03-29 11:54:53 mike Exp $ +# $Id: IRSpy.pm,v 1.80 2007-03-30 09:50:55 mike Exp $ package ZOOM::IRSpy; @@ -257,7 +257,7 @@ sub _really_rewrite_record { my $id = $xc->find("concat(e:serverInfo/e:host, ':', e:serverInfo/e:port, '/', e:serverInfo/e:database)"); - if ($id ne $oldid) { + if (defined $oldid && $id ne $oldid) { # Delete old record; warn "IDs differ (old='$oldid' new='$id')"; my $p = $conn->package();