git/contrib/mw-to-git
Célestin Matte e83d36b66f git-remote-mediawiki: brace file handles for print for more clarity
This follows the following rule:
InputOutput::RequireBracedFileHandleWithPrint (Severity: 1)
    The `print' and `printf' functions have a unique syntax that supports an
    optional file handle argument. Conway suggests wrapping this argument in
    braces to make it visually stand out from the other arguments. When you
    put braces around any of the special package-level file handles like
    `STDOUT', `STDERR', and `DATA', you must the `'*'' sigil or else it
    won't compile under `use strict 'subs''.

      print $FH   "Mary had a little lamb\n";  #not ok
      print {$FH} "Mary had a little lamb\n";  #ok

      print   STDERR   $foo, $bar, $baz;  #not ok
      print  {STDERR}  $foo, $bar, $baz;  #won't compile under 'strict'
      print {*STDERR}  $foo, $bar, $baz;  #perfect!

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-14 09:02:18 -07:00
..
t git-remote-mediawiki: spelling fixes 2013-04-12 12:13:05 -07:00
.gitignore git-remote-mediawiki: use toplevel's Makefile 2013-02-08 10:02:32 -08:00
git-remote-mediawiki.perl git-remote-mediawiki: brace file handles for print for more clarity 2013-06-14 09:02:18 -07:00
git-remote-mediawiki.txt git-remote-mediawiki: new wiki URL in documentation 2013-04-04 09:54:38 -07:00
Makefile git-remote-mediawiki: use toplevel's Makefile 2013-02-08 10:02:32 -08:00