Re: pgsql: ecpg: Output dir, source dir, stamp file argument for preproc/*.
От | Tom Lane |
---|---|
Тема | Re: pgsql: ecpg: Output dir, source dir, stamp file argument for preproc/*. |
Дата | |
Msg-id | 822625.1658179641@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: pgsql: ecpg: Output dir, source dir, stamp file argument for preproc/*. (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: pgsql: ecpg: Output dir, source dir, stamp file argument for preproc/*.
|
Список | pgsql-committers |
Andres Freund <andres@anarazel.de> writes: > Jul 18 16:48:25 ./src/interfaces/ecpg/preproc/parse.pl: Bareword file handle opened at line 30, column 1. See pages 202,204of PBP. ([InputOutput::ProhibitBarewordFileHandles] Severity: 5) > Jul 18 16:48:25 ./src/interfaces/ecpg/preproc/parse.pl: Bareword file handle opened at line 31, column 1. See pages 202,204of PBP. ([InputOutput::ProhibitBarewordFileHandles] Severity: 5) > afaict that's bogus. It's unnecessary that the code uses "our" instead of > "my", but there's no bareword there and replacing our with my fixes that > complaint. Ah, I think I've got it. Per "man perlfunc": "our" has the same scoping rules as "my" or "state", meaning that it is only valid within a lexical scope. Unlike "my" and "state", which both declare new (lexical) variables, "our" only creates an alias to an existing variable: a package variable of the same name. Since there's not actually any such package variable, the net effect is that the first argument of open() is an undeclared name. I can more or less see why perl might treat that the same as a bareword, though I definitely agree that this error message is more confusing than helpful. regards, tom lane
В списке pgsql-committers по дате отправления: