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 <bodo@bravo.com>' ); $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.
licensizer
You define a .licensizer.yml file at the top level of your project containing the desired AUTHOR and LICENSE data like
.licensizer.yml
# .licensizer.yml author: | Bodo Bravo <bodo@bravo.com> Zach Zulu <zach@zulu.com> license: | Copyright 2002-2011 by Bodo Bravo <bodo@bravo.com> and Zach Zulu <zach@zulu.com>. All rights reserved.
and then simply run the licensizer script.
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.
Advanced format:
# .licensizer.yml author: text: | Mike Schilli <cpan@perlmeister.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.
The 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).
verbatim
new
Constructor.
$licensizer->load_file( $file )
Load and parse a file containing POD.
$licensizer-
Update the POD's AUTHOR section.
Update the POD's LICENSE section.
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 <cpan@perlmeister.com>
To install Pod::Licensizer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pod::Licensizer
CPAN shell
perl -MCPAN -e shell install Pod::Licensizer
For more information on module installation, please visit the detailed CPAN module installation guide.