[Po4a-commits] "po4a/lib/Locale/Po4a Po.pm, 1.52, 1.53 Sgml.pm, 1.106, 1.107 TransTractor.pm, 1.71, 1.72 Wml.pm, 1.4, 1.5"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Thu Feb 23 16:10:43 UTC 2006


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv30051/lib/Locale/Po4a

Modified Files:
	Po.pm Sgml.pm TransTractor.pm Wml.pm 
Log Message:
Replace some '||' by 'or' (|| has an higher priority than ,).


Index: Wml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Wml.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Wml.pm	4 Sep 2005 07:16:46 -0000	1.4
+++ Wml.pm	23 Feb 2006 16:10:41 -0000	1.5
@@ -89,7 +89,7 @@
     foreach my $filename (@{$self->{DOCWML}{infile}}) {
 #      print STDERR "TMP: $tmp_filename\n";
       my $file;
-      open FILEIN,"$filename" || die "Cannot read $filename: $!\n";
+      open FILEIN,"$filename" or die "Cannot read $filename: $!\n";
       {
         $/ = undef; 
         $file=<FILEIN>;
@@ -116,7 +116,7 @@
       open OUTFILE,">$tmp_filename";
       print OUTFILE $file;
       close INFILE;
-      close OUTFILE || die "Cannot write $tmp_filename: $!\n";
+      close OUTFILE or die "Cannot write $tmp_filename: $!\n";
       
       # Build the XML TransTractor which will do the job for us
       my $xmlizer = Locale::Po4a::Chooser::new("xhtml");

Index: Po.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Po.pm,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- Po.pm	22 Feb 2006 18:10:50 -0000	1.52
+++ Po.pm	23 Feb 2006 16:10:41 -0000	1.53
@@ -327,14 +327,14 @@
         $self->write($tmp_filename);
         $diff = qx(diff -q -I'#:' -I'POT-Creation-Date:' -I'PO-Revision-Date:' $filename $tmp_filename);
         if ( $diff eq "" ) {
-            unlink $tmp_filename ||
+            unlink $tmp_filename or
                 die wrap_msg(dgettext("po4a","Can't unlink %s."),
                              $tmp_filename);
             # touch it
             my ($atime, $mtime) = (time,time);
             utime $atime, $mtime, $filename;
         } else {
-            move $tmp_filename, $filename ||
+            move $tmp_filename, $filename or
                 die wrap_msg(dgettext("po4a","Can't rename %s to %s."),
                              $tmp_filename, $filename);
         }

Index: TransTractor.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TransTractor.pm,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- TransTractor.pm	6 Dec 2005 16:32:06 -0000	1.71
+++ TransTractor.pm	23 Feb 2006 16:10:41 -0000	1.72
@@ -432,14 +432,14 @@
 	      if (length ($dir) && ! -e $dir);
 	}
 	open $fh,">$filename"
-	    || croak wrap_msg(dgettext("po4a", "Can't write to %s: %s"), $filename, $!);
+	    or croak wrap_msg(dgettext("po4a", "Can't write to %s: %s"), $filename, $!);
     }
     
     map { print $fh $_ } $self->docheader();
     map { print $fh $_ } @{$self->{TT}{doc_out}};
 
     if ($filename ne '-') {
-	close $fh || croak wrap_msg(dgettext("po4a", "Can't close %s after writing: %s"), $filename, $!);
+	close $fh or croak wrap_msg(dgettext("po4a", "Can't close %s after writing: %s"), $filename, $!);
     }
 
 }

Index: Sgml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Sgml.pm,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -d -r1.106 -r1.107
--- Sgml.pm	29 Jan 2006 14:54:16 -0000	1.106
+++ Sgml.pm	23 Feb 2006 16:10:41 -0000	1.107
@@ -339,7 +339,7 @@
     while (<IN>) {
 	$origfile .= $_;
     }
-    close IN || die wrap_mod("po4a::sgml", dgettext("po4a", "Can't close %s: %s"), $mastername, $!);
+    close IN or die wrap_mod("po4a::sgml", dgettext("po4a", "Can't close %s: %s"), $mastername, $!);
     # Detect the XML pre-prolog
     if ($origfile =~ s/^(\s*<\?xml[^?]*\?>)//) {
 	warn wrap_mod("po4a::sgml", dgettext("po4a",
@@ -563,7 +563,7 @@
 	        # find the file.
 	        $origfile =~ s/(<!ENTITY\s*%\s*\Q$key\E\s+SYSTEM\s*")\Q$origfilename\E("\s*>)/$1$filename$2/gsi;
 	    }
-	    if (defined $ignored_inclusion{$key} || !-e $filename) {
+	    if (defined $ignored_inclusion{$key} or !-e $filename) {
 		# We won't expand this entity.
 		# And we avoid nsgmls to do so.
 		$prolog = "$begin<!--{PO4A-ent-beg-$key}$filename".
@@ -740,7 +740,7 @@
                                               DIR    => "/tmp",
                                               UNLINK => 0);
     print $tmpfh $origfile;
-    close $tmpfh || die wrap_mod("po4a::sgml", dgettext("po4a", "Can't close tempfile: %s"), $!);
+    close $tmpfh or die wrap_mod("po4a::sgml", dgettext("po4a", "Can't close tempfile: %s"), $!);
 
     my $cmd="nsgmls -l -E 0 -wno-valid < $tmpfile".
             ($debug{'nsgmls'}?"":" 2>/dev/null")." |";




More information about the Po4a-commits mailing list