[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/10] Proper file name escaping in Autoconf programs and Perl
From: |
Russ Allbery |
Subject: |
Re: [PATCH 1/10] Proper file name escaping in Autoconf programs and Perl modules. |
Date: |
Tue, 04 Dec 2007 13:48:13 -0800 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Ralf Wildenhues <address@hidden> writes:
> This includes escaping of characters special to the shell as well as
> special to Perl, e.g., leading `<' or `>'. For example, when $file
> starts with `>', `open ">$file"' wrongly tries to append to a different
> file.
The best fix here from a Perl perspective would be to use the
three-argument form of open everywhere rather than just appending
characters to the file name argument of the two-argument form. You then
require Perl 5.006, but that's not a bad requirement these days.
When using the two-argument form, files with leading or trailing
whitespace will still cause you problems even with an explicit mode
character always prepended.
--
Russ Allbery (address@hidden) <http://www.eyrie.org/~eagle/>
- [PATCH 0/10] Whitespace robustness patch series, Ralf Wildenhues, 2007/12/04
- [PATCH 1/10] Proper file name escaping in Autoconf programs and Perl modules., Ralf Wildenhues, 2007/12/04
- Re: [PATCH 1/10] Proper file name escaping in Autoconf programs and Perl modules.,
Russ Allbery <=
- Re: [PATCH 1/10] Proper file name escaping in Autoconf programs and Perl modules., Paul Eggert, 2007/12/04
- Re: [PATCH 1/10] Proper file name escaping in Autoconf programs and Perl modules., Eric Blake, 2007/12/05
- Re: [PATCH 1/10] Proper file name escaping in Autoconf programs and Perl modules., Ralf Wildenhues, 2007/12/06
- Re: [PATCH 1/10] Proper file name escaping in Autoconf programs and Perl modules., Eric Blake, 2007/12/12
- Re: [PATCH 1/10] Proper file name escaping in Autoconf programs and Perl modules., Ralf Wildenhues, 2007/12/13
[PATCH 2/10] * lib/autom4te.in: Quote @address@hidden, Ralf Wildenhues, 2007/12/04
[PATCH 3/10] Fix Autotest for whitespace in `pwd`., Ralf Wildenhues, 2007/12/04