From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: WIP pgindent replacement |
Date: | 2012-08-03 18:08:34 |
Message-ID: | 501C13A2.5070105@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 08/03/2012 01:23 PM, Bruce Momjian wrote:
> On Fri, Aug 3, 2012 at 12:51:03PM -0400, Andrew Dunstan wrote:
>> On 08/03/2012 10:51 AM, Bruce Momjian wrote:
>>
>>
>>> OK, sure, we can keep the pgindent name --- I was just trying to be
>>> consistent. One problem with the lack of an extension is that there is
>>> no easy way for the Perl cleanup instructions to find all the Perl
>>> executables --- right now it looks for an extension. Do we have other
>>> Perl scripts in our tree that don't end in *.pl or *.pm? I didn't find
>>> any with this script:
>>>
>>> $ find . -type f -exec file {} \;|grep Perl
>>> ./src/backend/catalog/Catalog.pm: Perl5 module source text
>>> ./src/tools/msvc/MSBuildProject.pm: Perl5 module source text
>>> ./src/tools/msvc/Project.pm: Perl5 module source text
>>> ./src/tools/msvc/Mkvcbuild.pm: Perl5 module source text
>>> ./src/tools/msvc/Install.pm: Perl5 module source text
>>> ./src/tools/msvc/Solution.pm: Perl5 module source text
>>> ./src/tools/msvc/VCBuildProject.pm: Perl5 module source text
>>> ./src/tools/msvc/VSObjectFactory.pm: Perl5 module source text
>> Try:
>>
>> find . -exec file {} \; | egrep 'perl script|perl -w script|Perl5
>> module'
> OK, I used:
>
> $ find . -type f -exec file {} \;|
> egrep -i 'perl.*(script|module)'|grep -v '\.p[lm]:'
>
> and got:
>
> ./src/pl/plperl/ppport.h: awk script text
> ./src/tools/pginclude/pgcheckdefines: a /usr/bin/perl -w script text executable
> ./src/tools/git_changelog: a /usr/bin/perl script text executable
>
> The last two are Perl scripts without Perl file extensions, so let's
> just go with 'pgindent' and I will hard-code those into the perltidy
> instructions.
>
Your pattern has produced a false positive, though. Wouldn't it be
better not to hardcode anything?
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2012-08-03 18:37:58 | Re: pg_dump custom format without timestamp? |
Previous Message | Tom Lane | 2012-08-03 18:02:35 | Re: Re: SPGiST versus hot standby - question about conflict resolution rules |