and although i still need to get used to it, i'm already really happy with it. on the new project that i recently started (more on that later on), i'm letting dist::zilla deal with all those pesky copyright, version, pod, etc. stuff.
however, i'm used to add some boilerplate at the top of my files, as the fsf recommends. and i found nothing in dist::zilla to do that... so i just wrote a new plugin for it: dist::zilla::plugin::prepender.
just add the following in your dist.ini file:
but it can also be used to enforce some common pragma: since it will be inserted at the top of the file, the pragma will be applied to its lexical scope - the whole file itself in this case:[Prepender]
line = #
line = # This file is part of Foo::Bar
line = #
line = # Foo::Bar is copyright...
since those usages are quite common, i might as well in a future version propose them as options:[Prepender]
line = use strict;
line = use warnings;
but i'm not really sure... wdyt?[Prepender]
copyright = 1
strict = 1
warnings = 1
Copyright would be useful. Adding strict and warnings at dist build time makes no sense. You're going to want those present for your tests.
ReplyDelete@autarch: well, they would also be present for tests, since they are also handled by dist-zilla using "dzil test"
ReplyDelete