[Po4a-commits] "po4a/lib/Locale/Po4a Sgml.pm,1.100,1.101"
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Mon Nov 28 21:43:41 UTC 2005
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv19565/lib/Locale/Po4a
Modified Files:
Sgml.pm
Log Message:
I'm using these debugging information much too often not to commit this.
Index: Sgml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Sgml.pm,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -d -r1.100 -r1.101
--- Sgml.pm 28 Nov 2005 21:35:36 -0000 1.100
+++ Sgml.pm 28 Nov 2005 21:43:39 -0000 1.101
@@ -210,10 +210,11 @@
use File::Temp;
-my %debug=('tag' => 0,
- 'generic' => 0,
+my %debug=('tag' => 0,
+ 'generic' => 0,
'entities' => 0,
- 'refs' => 0);
+ 'refs' => 0,
+ 'nsgmls' => 0);
my $xmlprolog = undef; # the '<?xml ... ?>' line if existing
@@ -740,8 +741,9 @@
print $tmpfh $origfile;
close $tmpfh || die wrap_mod("po4a::sgml", dgettext("po4a", "Can't close tempfile: %s"), $!);
- my $cmd="nsgmls -l -E 0 -wno-valid <$tmpfile 2>/dev/null|";
- print STDERR "CMD=$cmd\n" if ($debug{'generic'});
+ my $cmd="nsgmls -l -E 0 -wno-valid < $tmpfile".
+ ($debug{'nsgmls'}?"":" 2>/dev/null")." |";
+ print STDERR "CMD=$cmd\n" if ($debug{'generic'} or $debug{'nsgmls'});
open (IN,$cmd) || die wrap_mod("po4a::sgml", dgettext("po4a", "Can't run nsgmls: %s"), $!);
@@ -1083,7 +1085,7 @@
"functional. Please make sure that nsgmls is present and ".
"does not produce any error (with the -wno-valid option), ".
"and report a bug otherwise. Continuing...")) if ($? != 0);
- unlink ($tmpfile) unless $debug{'refs'};
+ unlink ($tmpfile) unless ($debug{'refs'} or $debug{'nsgmls'});
}
sub end_paragraph {
More information about the Po4a-commits
mailing list