Question

By default if Dist::Zilla finds no copyright year it will use the current year, since it doesn't seem to support multiple years or year ranges I find the current year to be most appropriate. However, whenever I run dzil new Module it automatically inserts the copyright year into my dist.ini. Is there a way to prevent Dist::Zilla from doing this?

Was it helpful?

Solution

Remove [DistINI] from your minting profile, and use a template dist.ini file with GatherDir::Template instead. That's much more flexible.

As an example, here's my skel/dist.ini:

;                                                       -*-conf-windows-*-{{
    $license = ref $dist->license;
    if ( $license =~ /^Software::License::(.+)$/ ) {
        $license = $1;
    } else {
        $license = "=$license";
    }

    $authors = join( "\n", map { "author  = $_" } @{$dist->authors} );
    '';
}}
name    = {{$dist->name}}
{{$authors}}
license = {{$license}}
copyright_holder = {{$dist->copyright_holder}}

[@Author::CJM / CJM]

[AutoPrereqs]
skip = ^(?:lib|strict|utf8|warnings)$

And then my profile.ini includes:

[GatherDir::Template]
root = skel
include_dotfiles = 1 ; want .gitignore
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top