Pod::Licensizer - Keep your project's AUTHOR and LICENSE sections in sync
# Command line: $ licensizer # API: use Pod::Licensizer; my $licensizer = Pod::Licensizer->new(); $licensizer->load_file( "MyModule.pm" ); $licensizer->author_patch( 'Bodo Bravo <firstname.lastname@example.org>' ); $licensizer->license_patch( 'Copyright 2011 blah blah blah' ); $licensizer->write_file();
Pod::Licensizer helps keeping AUTHOR and LICENSE sections in sync across many source files in a project.
Pod::Licensizer comes with a command line utility,
licensizer, which traverses a source tree, picks files containing POD documentation, and refreshes their AUTHOR and LICENSE sections.
You define a
.licensizer.yml file at the top level of your project containing the desired AUTHOR and LICENSE data like
# .licensizer.yml author: | Bodo Bravo <email@example.com> Zach Zulu <firstname.lastname@example.org> license: | Copyright 2002-2011 by Bodo Bravo <email@example.com> and Zach Zulu <firstname.lastname@example.org>. All rights reserved.
and then simply run the
This is helpful if you want to add an author to your project or change the year in the copyright notice. All you have to do is edit the
.licensizer.yml file and run
# .licensizer.yml author: text: | Mike Schilli <email@example.com> mode: verbatim license: text: | Copyright 2011 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
verbatim mode setting makes sure that POD doesn't reformat the text. This is especially useful if you use tabular data (e.g. a vertical column of author names).
$licensizer->load_file( $file )
Load and parse a file containing POD.
$licensizer->author_patch( "author text", $opts )>
Update the POD's AUTHOR section.
$licensizer->license_patch( "license text", $opts )>
Update the POD's LICENSE section.
$licensizer->write_file( $filename )>
Write back the file. If $filename is omitted, the original file is overwritten.
Strictly speaking, no. But what a boring world that would be if you couldn't make up your own words.
Copyright 2011 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
2011, Mike Schilli <firstname.lastname@example.org>