From: Mike Taylor Date: Tue, 27 Feb 2007 14:51:10 +0000 (+0000) Subject: Complain if saved-XML files can't be opened. X-Git-Tag: CPAN-v1.02~588 X-Git-Url: http://jsfdemo.indexdata.com/?a=commitdiff_plain;h=6f66af7a4fe0d290bf9a93add251c15f97494be5;p=irspy-moved-to-github.git Complain if saved-XML files can't be opened. --- diff --git a/lib/ZOOM/IRSpy.pm b/lib/ZOOM/IRSpy.pm index 7c99f09..824c6e3 100644 --- a/lib/ZOOM/IRSpy.pm +++ b/lib/ZOOM/IRSpy.pm @@ -1,4 +1,4 @@ -# $Id: IRSpy.pm,v 1.70 2007-02-26 22:20:08 mike Exp $ +# $Id: IRSpy.pm,v 1.71 2007-02-27 14:51:10 mike Exp $ package ZOOM::IRSpy; @@ -263,7 +263,8 @@ sub _irspy_to_zeerex { if ($save_xml) { unlink('/tmp/irspy_orig.xml'); - open FH, '>/tmp/irspy_orig.xml'; + open FH, '>/tmp/irspy_orig.xml' + or die "can't write irspy_orig.xml: $!"; print FH $irspy_doc->toString(); close FH; } @@ -271,7 +272,8 @@ sub _irspy_to_zeerex { my $result = $this->{irspy_to_zeerex_style}->transform($irspy_doc, %params); if ($save_xml) { unlink('/tmp/irspy_transformed.xml'); - open FH, '>/tmp/irspy_transformed.xml'; + open FH, '>/tmp/irspy_transformed.xml' + or die "can't write irspy_transformed.xml: $!"; print FH $result->toString(); close FH; }