Dist::Zilla Consults the Law

I can see the end soon for POD here in the Dist-Pen but not quite yet.

In my last post I had a real quick look at the [Authors] section plug-in and how the trick to using it is to know that the list of authors comes from your 'dist.ini' file. Today I am going to look [Legal] the last of the sections found in the [@Default] template.

As you can guess this is where Pod::Weaver dumps the legal stuff we all love to add to your PODs. Like the [Authors] plug-in this one gets its info from the 'dist.ini' file. In my file I have

author = John Scoles 
license = GPL_3
copyright_holder = John Scoles
and that is why I get


This software is Copyright (c) 2018 by John Scoles.

This is free software, licensed under:

The GNU General Public License, Version 3, June 2007


when I do a clean and build with dzil. Above you see how [Legal] sets the copy-right notice using my name, it always gets the first author for this. Next is the license Blurb as a specify GPL_3 Pod::Weaver is smart enough to go out and find the appropriate text. I finds this text in the aptly named Software::License::GPL_3 which it passed to it, like I mentioned eariler, through the 'dist.ini' file via Dist::Zilla.

There are two attributes for this plug-in the standard header' attribute in case I want to change the heading to something other than 'COPYRIGHT AND LICENSE'.

The other attribute is 'license_file' which you can use to point to the full text of the particular license you are using. Quite easy to use just add this in the 'weaver.ini'

and after a clean and build I get

  The GNU General Public License, Version 3, June 2007

The full text of the license can be found in the
F<LICENSE> file included with this distribution.


In this case I have it set up in my 'dist.ini' file to produce that 'LICENSE' document as I have the [License] installed in that file.

Another quick post-ette for today.


Leave a comment

About byterock

user-pic Long time Perl guy, a few CPAN mods allot of work on DBD::Oracle and a few YAPC presentations