Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Copyright chang script and test

3 views
Skip to first unread message

Klaas-Jan Stol

unread,
Feb 2, 2007, 10:37:59 AM2/2/07
to 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

unread,
Feb 2, 2007, 2:04:17 PM2/2/07
to 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 new messages