NAME - Tool to update copyright years

SYNOPSIS [options] path...


 -q [--quiet]           : Do not show per file progress messages
 -v [--verbose]         : Show diffs to changed files
 -i [--ignore-years]    : Ignore the years already present use history only

DESCRIPTION is a script that uses svk to figure out when each file in your project has changed and updates the copyright headers in those files accordingly.

Run help to access the built-in tool documentation.



The year in which we live today. This is added to the copyright of any file that is modified, since we're modifying it today. If we didn't do this a subsequent run of this script would add it anyway.

flushline ()

Helper function to clear a console line.

expandRange ($years)

Take the string $years containing comma separated years or dash separated year ranges and returns a list of years.

For example the string '1998, 2000-2002, 2004' results in the list qw(1998 2000 2001 2002 2004).

createRange (@years)

Takes a sorted list of years @years and returns a string of comma separated years or dash separated year ranges.

For example the list qw(1998 2000 2001 2002 2004) results in the string '1998-2002, 2004'.

transform_line($line, @years)

If $line contains a copyright message add the years in @years to it and return the resulting line. If there is no Copyright on a line return undef. If @years is not specified Copyright lines are returned as is.


Return a sorted list of years in which $filename was modified.


Update the copyright of one file.


Michael L.H. Brouwer <<gt>


Copyright 2006 by Michael L.H. Brouwer <>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.