Google Grupper har inte längre stöd för nya Usenet-inlägg eller -prenumerationer. Historiskt innehåll förblir synligt.
Dismiss

Copyright chang script and test

4 visningar
Hoppa till det första olästa meddelandet

Klaas-Jan Stol

oläst,
2 feb. 2007 10:37:592007-02-02
till perl6-i...@perl.org
hi,

attached are 2 files: a script that checks all files for the Last
Changed Date according to SVN, and updates the file if its year >
copyright notice in the file. I'm not very good with Perl, so it might
be badly programmed... However, it only needs running once.

The 2nd file is a test, and again, this only needs to run once a year.

Issues with the test file:
* I redirect stderr to stdout, maybe it needs to be restored later, but
I can imagine each test is a new invocation of perl, so in that case
it's not necessary.
* if it finds a file that is literally out of date (it needs copyright
notice update), it will only give an error message, not the file name
(which should really be the case, otherwise, you don't know what file to
fix)

* on ctrl-c it won't stop (well, for 1 second after which it
continues...) I guess it has to do with me using File::Find...

The test file can just be put in the parrot/t/configure directory, that
one will be run first when doing make test (so you don't have to wait
for it to run)

hope this helps,
klaas-jan


adjustcopyright.t
changeCopyright.pl

Chromatic

oläst,
2 feb. 2007 14:04:172007-02-02
till perl6-i...@perl.org
On Friday 02 February 2007 07:45, Klaas-Jan Stol wrote:

> attached are 2 files: a script that checks all files for the Last
> Changed Date according to SVN, and updates the file if its year
> copyright notice in the file. I'm not very good with Perl, so it might
> be badly programmed... However, it only needs running once.

I'll take a look at these this afternoon; I have a couple of ideas for polish
on the Perl program.

Thanks,
-- c

0 nya meddelanden