[Po4a-commits] r2748 - /trunk/lib/Locale/Po4a/Xml.pm

barbier at users.alioth.debian.org barbier at users.alioth.debian.org
Mon Jan 20 21:30:04 UTC 2014


Author: barbier
Date: Mon Jan 20 21:30:04 2014
New Revision: 2748

URL: http://svn.debian.org/wsvn/po4a/?sc=1&rev=2748
Log:
Fix indentation

Modified:
    trunk/lib/Locale/Po4a/Xml.pm

Modified: trunk/lib/Locale/Po4a/Xml.pm
URL: http://svn.debian.org/wsvn/po4a/trunk/lib/Locale/Po4a/Xml.pm?rev=2748&op=diff
==============================================================================
--- trunk/lib/Locale/Po4a/Xml.pm	(original)
+++ trunk/lib/Locale/Po4a/Xml.pm	Mon Jan 20 21:30:04 2014
@@ -82,52 +82,52 @@
     if ($self->{options}{'includeexternal'}) {
         my $tmp;
 
-    for my $k (keys %entities) {
-        if ($line =~ m/^(.*?)&$k;(.*)$/s) {
-            my ($before, $after) = ($1, $2);
-            my $linenum=0;
-            my @textentries;
-
-            $tmp = $before;
-            my $tmp_in_comment = 0;
-            if ($_shiftline_in_comment) {
-                if ($before =~ m/^.*?-->(.*)$/s) {
-                    $tmp = $1;
-                    $tmp_in_comment = 0;
-                } else {
-                    $tmp_in_comment = 1;
+        for my $k (keys %entities) {
+            if ($line =~ m/^(.*?)&$k;(.*)$/s) {
+                my ($before, $after) = ($1, $2);
+                my $linenum=0;
+                my @textentries;
+
+                $tmp = $before;
+                my $tmp_in_comment = 0;
+                if ($_shiftline_in_comment) {
+                    if ($before =~ m/^.*?-->(.*)$/s) {
+                        $tmp = $1;
+                        $tmp_in_comment = 0;
+                    } else {
+                        $tmp_in_comment = 1;
+                    }
                 }
+                if ($tmp_in_comment == 0) {
+                    while ($tmp =~ m/^.*?<!--.*?-->(.*)$/s) {
+                        $tmp = $1;
+                    }
+                    if ($tmp =~ m/<!--/s) {
+                        $tmp_in_comment = 1;
+                    }
+                }
+                next if ($tmp_in_comment);
+
+                open (my $in, $entities{$k})
+                    or croak wrap_mod("po4a::xml",
+                                      dgettext("po4a", "Can't read from %s: %s"),
+                                      $entities{$k}, $!);
+                while (defined (my $textline = <$in>)) {
+                    $linenum++;
+                    my $textref=$entities{$k}.":$linenum";
+                    push @textentries, ($textline,$textref);
+                }
+                close $in
+                    or croak wrap_mod("po4a::xml",
+                              dgettext("po4a", "Can't close %s after reading: %s"),
+                                      $entities{$k}, $!);
+
+                push @textentries, ($after, $ref);
+                $line = $before.(shift @textentries);
+                $ref .= " ".(shift @textentries);
+                $self->unshiftline(@textentries);
             }
-            if ($tmp_in_comment == 0) {
-                while ($tmp =~ m/^.*?<!--.*?-->(.*)$/s) {
-                    $tmp = $1;
-                }
-                if ($tmp =~ m/<!--/s) {
-                    $tmp_in_comment = 1;
-                }
-            }
-            next if ($tmp_in_comment);
-
-            open (my $in, $entities{$k})
-                or croak wrap_mod("po4a::xml",
-                                  dgettext("po4a", "Can't read from %s: %s"),
-                                  $entities{$k}, $!);
-            while (defined (my $textline = <$in>)) {
-                $linenum++;
-                my $textref=$entities{$k}.":$linenum";
-                push @textentries, ($textline,$textref);
-            }
-            close $in
-                or croak wrap_mod("po4a::xml",
-                          dgettext("po4a", "Can't close %s after reading: %s"),
-                                  $entities{$k}, $!);
-
-            push @textentries, ($after, $ref);
-            $line = $before.(shift @textentries);
-            $ref .= " ".(shift @textentries);
-            $self->unshiftline(@textentries);
-        }
-    }
+        }
 
         $tmp = $line;
         if ($_shiftline_in_comment) {




More information about the Po4a-commits mailing list