From 0ca7a8e129f95070581059266f665e80214ad7ce Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 21 Dec 2006 16:35:11 +0000 Subject: [PATCH] Debugging save of XML to files in /tmp now controlled by variable. --- lib/ZOOM/IRSpy.pm | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/lib/ZOOM/IRSpy.pm b/lib/ZOOM/IRSpy.pm index ff85dec..d2a1ad0 100644 --- a/lib/ZOOM/IRSpy.pm +++ b/lib/ZOOM/IRSpy.pm @@ -1,4 +1,4 @@ -# $Id: IRSpy.pm,v 1.55 2006-12-18 15:32:32 mike Exp $ +# $Id: IRSpy.pm,v 1.56 2006-12-21 16:35:11 mike Exp $ package ZOOM::IRSpy; @@ -248,15 +248,22 @@ sub _render_record { sub _irspy_to_zeerex { my ($this, $conn) = @_; my $irspy_doc = $conn->record()->{zeerex}->ownerDocument; - #open FH, '>/tmp/irspy_orig.xml'; - #print FH $irspy_doc->toString(); - #close FH; + my $save_xml = 0; + + if ($save_xml) { + unlink('/tmp/irspy_orig.xml'); + open FH, '>/tmp/irspy_orig.xml'; + print FH $irspy_doc->toString(); + close FH; + } my %params = (); my $result = $this->{irspy_to_zeerex_style}->transform($irspy_doc, %params); - - #open FH, '>/tmp/irspy_transformed.xml'; - #print FH $result->toString(); - #close FH; + if ($save_xml) { + unlink('/tmp/irspy_transformed.xml'); + open FH, '>/tmp/irspy_transformed.xml'; + print FH $result->toString(); + close FH; + } return $result->documentElement(); } -- 1.7.10.4