automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo-map-fixme.patch


From: Alexandre Duret-Lutz
Subject: texinfo-map-fixme.patch
Date: 17 Nov 2001 15:00:01 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

The `map' entry in the perlfunc man page says:

[...]
         "{" starts both hash references and blocks, so
         "map { ..." could be either the start of map BLOCK
         LIST or map EXPR, LIST. Because perl doesn't look
         ahead for the closing "}" it has to take a guess
         at which its dealing with based what it finds just
         after the "{". Usually it gets it right, but if it
         doesn't it won't realize something is wrong until
         it gets to the "}" and encounters the missing (or
         unexpected) comma. The syntax error will be
         reported close to the "}" but you'll need to
         change something near the "{" such as using a
         unary "+" to give perl some help:

             %hash = map {  "\L$_", 1  } @array  # perl guesses EXPR.  wrong
             %hash = map { +"\L$_", 1  } @array  # perl guesses BLOCK. right
[...]

Index: ChangeLog
--- ChangeLog
+++ ChangeLog
@@ -1,1 +1,6 @@
+2001-11-17  Alexandre Duret-Lutz  <address@hidden>
+
+       * automake.in (scan_texinfo_file): Suppress FIXME about strange
+       map behavior.
+

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1238
diff -u -r1.1238 automake.in
--- automake.in 2001/11/16 10:33:15     1.1238
+++ automake.in 2001/11/17 14:10:50
@@ -2990,8 +2990,7 @@
 
     my $infobase = basename ($filename);
     $infobase =~ s/\.te?xi(nfo)?$//;
-    # FIXME: I don't understand why, but I can't use "$infobase.$_" => 1.
-    my %clean_files = map { "$infobase" . ".$_" => 1 } @clean_suffixes;
+    my %clean_files = map { +"$infobase.$_" => 1 } @clean_suffixes;
     grep { delete $clean_files{"$infobase.$_"} } @syncodeindexes;
     return ($outfile, $vfile, (sort keys %clean_files));
 }


-- 
Alexandre Duret-Lutz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]