From 1d12436f39c61fb342432822f70e7ededa7e12ca Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 12 Apr 2010 13:56:39 +0100 Subject: [PATCH] _irspy_to_zeerex() now checks the IRSPY_SAVE_XML environment variable for itself rather than accepting a parameter that its caller must fill in from that variable. Simplifies interface. --- lib/ZOOM/IRSpy.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ZOOM/IRSpy.pm b/lib/ZOOM/IRSpy.pm index 13e6321..f5df4b5 100644 --- a/lib/ZOOM/IRSpy.pm +++ b/lib/ZOOM/IRSpy.pm @@ -262,7 +262,9 @@ sub _hash { sub _irspy_to_zeerex { my $this = shift(); - my($conn, $save_xml) = @_; + my($conn) = @_; + + my $save_xml = $ENV{IRSPY_SAVE_XML}; my $irspy_doc = $conn->record()->{zeerex}->ownerDocument; if ($save_xml) { @@ -291,7 +293,7 @@ sub _rewrite_record { my($conn) = @_; $conn->log("irspy", "rewriting XML record"); - my $rec = $this->_irspy_to_zeerex($conn, $ENV{IRSPY_SAVE_XML}); + my $rec = $this->_irspy_to_zeerex($conn); # Since IRSpy can run for a long time between writes back to the # database, it's quite possible for the server to have closed the -- 1.7.10.4