Re: [HACKERS] New copyright program

2011-08-19 Thread David Fetter
On Fri, Aug 19, 2011 at 09:49:35PM -0400, Bruce Momjian wrote: > David Fetter wrote: > > On Fri, Aug 19, 2011 at 09:22:03PM -0400, Andrew Dunstan wrote: > > > On 08/19/2011 09:02 PM, David Fetter wrote: > > > >On Fri, Aug 19, 2011 at 07:37:29PM -0400, Andrew Dunstan wrote: > > > >> > > > >>On 08/19

Re: [HACKERS] New copyright program

2011-08-19 Thread Andrew Dunstan
On 08/19/2011 09:39 PM, David Fetter wrote: Tie::File ships as part of core Perl for all non-EOL versions, so I really can't consider this as a problem. Which are those? 5.12 and 5.14 are still supported. 5.10 and earlier are EOL. http://news.perlfoundation.org/2011/05/perl-514.html We

Re: [HACKERS] New copyright program

2011-08-19 Thread Bruce Momjian
David Fetter wrote: > On Fri, Aug 19, 2011 at 09:22:03PM -0400, Andrew Dunstan wrote: > > On 08/19/2011 09:02 PM, David Fetter wrote: > > >On Fri, Aug 19, 2011 at 07:37:29PM -0400, Andrew Dunstan wrote: > > >> > > >>On 08/19/2011 07:31 PM, Bruce Momjian wrote: > > >>>Kris Jurka wrote: > > Did y

Re: [HACKERS] New copyright program

2011-08-19 Thread David Fetter
On Fri, Aug 19, 2011 at 09:22:03PM -0400, Andrew Dunstan wrote: > On 08/19/2011 09:02 PM, David Fetter wrote: > >On Fri, Aug 19, 2011 at 07:37:29PM -0400, Andrew Dunstan wrote: > >> > >>On 08/19/2011 07:31 PM, Bruce Momjian wrote: > >>>Kris Jurka wrote: > Did you also try the "use Tie::File" ad

Re: [HACKERS] New copyright program

2011-08-19 Thread Andrew Dunstan
On 08/19/2011 09:02 PM, David Fetter wrote: On Fri, Aug 19, 2011 at 07:37:29PM -0400, Andrew Dunstan wrote: On 08/19/2011 07:31 PM, Bruce Momjian wrote: Kris Jurka wrote: Did you also try the "use Tie::File" addition in my fix because your current coding doesn't work at all. The tie operat

Re: [HACKERS] New copyright program

2011-08-19 Thread David Fetter
On Fri, Aug 19, 2011 at 07:37:29PM -0400, Andrew Dunstan wrote: > > > On 08/19/2011 07:31 PM, Bruce Momjian wrote: > >Kris Jurka wrote: > >>Did you also try the "use Tie::File" addition in my fix because your > >>current coding doesn't work at all. The tie operation is key to actually > >>writin

Re: [HACKERS] New copyright program

2011-08-19 Thread Kris Jurka
On Fri, 19 Aug 2011, Bruce Momjian wrote: > Andrew Dunstan wrote: > > > > It probably doesn't matter that much in this context, but I should point > > out that Tie::File is not universally available. Some years ago I had to > > revert its use in the buildfarm code for that reason. In general

Re: [HACKERS] New copyright program

2011-08-19 Thread Bruce Momjian
Andrew Dunstan wrote: > > > On 08/19/2011 07:31 PM, Bruce Momjian wrote: > > Kris Jurka wrote: > >> Did you also try the "use Tie::File" addition in my fix because your > >> current coding doesn't work at all. The tie operation is key to actually > >> writing out the modified copyright notice.

Re: [HACKERS] New copyright program

2011-08-19 Thread Andrew Dunstan
On 08/19/2011 07:31 PM, Bruce Momjian wrote: Kris Jurka wrote: Did you also try the "use Tie::File" addition in my fix because your current coding doesn't work at all. The tie operation is key to actually writing out the modified copyright notice. Your version just updates the copyright year

Re: [HACKERS] New copyright program

2011-08-19 Thread Bruce Momjian
Kris Jurka wrote: > > > On Fri, 19 Aug 2011, Bruce Momjian wrote: > > > Was able to reproduce the error you reported with Perl 5.10. I then > > tried the single-quote idea I got from Googling, but then got an error > > about TIEARRAY being missing, so I recoded it as a simple file > > open/clos

Re: [HACKERS] New copyright program

2011-08-19 Thread Kris Jurka
On Fri, 19 Aug 2011, Bruce Momjian wrote: > Was able to reproduce the error you reported with Perl 5.10. I then > tried the single-quote idea I got from Googling, but then got an error > about TIEARRAY being missing, so I recoded it as a simple file > open/close. I also incorported your regex

Re: [HACKERS] New copyright program

2011-08-19 Thread Bruce Momjian
Kris Jurka wrote: > > > On Fri, 19 Aug 2011, Kris Jurka wrote: > > > For me this fails with: > > > > Bareword "Tie::File" not allowed while "strict subs" in use at > > /home/jurka/pg/server/postgresql/src/tools/copyright.pl line 28. > > > > This fixes things for me. The copyright matching w

Re: [HACKERS] New copyright program

2011-08-19 Thread David Fetter
On Fri, Aug 19, 2011 at 05:34:01PM -0400, Kris Jurka wrote: > On Fri, 19 Aug 2011, Kris Jurka wrote: > > > For me this fails with: > > > > Bareword "Tie::File" not allowed while "strict subs" in use at > > /home/jurka/pg/server/postgresql/src/tools/copyright.pl line 28. > > This fixes things fo

Re: [HACKERS] New copyright program

2011-08-19 Thread Kris Jurka
On Fri, 19 Aug 2011, Kris Jurka wrote: > For me this fails with: > > Bareword "Tie::File" not allowed while "strict subs" in use at > /home/jurka/pg/server/postgresql/src/tools/copyright.pl line 28. > This fixes things for me. The copyright matching wasn't working for me either without esc

Re: [HACKERS] New copyright program

2011-08-19 Thread Kris Jurka
On 8/19/2011 10:51 AM, Bruce Momjian wrote: David Fetter wrote: [Here's a new copyright program.] Thanks. Applied to HEAD. I never liked putting scripts in git that only I could run, but I thought if something happened to me, it would be good to record what I did. The Perl solution is perfe

Re: [HACKERS] New copyright program

2011-08-19 Thread Bruce Momjian
David Fetter wrote: > Folks, > > I noticed that src/tools/copyright looks like it can only be run on > Bruce's machine, so this translation to Perl is intended: > > 1. To make the script idempotent, which allows its safe use in > automated tools that might run it many times. > > 2. To get the

[HACKERS] New copyright program

2011-08-12 Thread David Fetter
Folks, I noticed that src/tools/copyright looks like it can only be run on Bruce's machine, so this translation to Perl is intended: 1. To make the script idempotent, which allows its safe use in automated tools that might run it many times. 2. To get the script to run on any machine a Postgre