From: Mike Taylor Date: Mon, 12 Apr 2010 12:56:39 +0000 (+0100) Subject: _irspy_to_zeerex() now checks the IRSPY_SAVE_XML environment variable X-Git-Tag: CPAN-v1.02~167 X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=commitdiff_plain;h=b6eea669753e5efab0faedf443c7dfdcdff5b2ff _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. --- 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