1Dist::Zilla::Plugin::GeUnseerratCeoFnitlrei(b3u)ted PerlDiDsotc:u:mZeinltlaat:i:oPnlugin::GenerateFile(3)
2
3
4
6 Dist::Zilla::Plugin::GenerateFile - build a custom file from only the
7 plugin configuration
8
10 version 6.023
11
13 In your dist.ini:
14
15 [GenerateFile]
16 filename = todo/{{ $dist->name }}-master-plan.txt
17 name_is_template = 1
18 content_is_template = 1
19 content = # Outlines the plan for world domination by {{$dist->name}}
20 content =
21 content = Item 1: Think of an idea!
22 content = Item 2: ?
23 content = Item 3: Profit!
24
26 This plugin adds a file to the distribution.
27
28 You can specify the content, as a sequence of lines, in your
29 configuration. The specified filename and content might be literals or
30 might be Text::Template templates.
31
32 Templating of the content
33 If you provide "content_is_template" (or "is_template") parameter of
34 "1", the content will be run through Text::Template. The variables
35 $plugin and $dist will be provided, set to the [GenerateFile] plugin
36 and the Dist::Zilla object respectively.
37
38 If you provide a "name_is_template" parameter of "1", the filename will
39 be run through Text::Template. The variables $plugin and $dist will be
40 provided, set to the [GenerateFile] plugin and the Dist::Zilla object
41 respectively.
42
44 This module should work on any version of perl still receiving updates
45 from the Perl 5 Porters. This means it should work on any version of
46 perl released in the last two to three years. (That is, if the most
47 recently released version is v5.40, then this module should work on
48 both v5.40 and v5.38.)
49
50 Although it may work on older versions of perl, no guarantee is made
51 that the minimum required version will not be increased. The version
52 may be increased for any reason, and there is no promise that patches
53 will be accepted to lower the minimum required perl.
54
56 filename
57 This attribute names the file you want to generate. It is required.
58
59 content
60 The "content" attribute is an arrayref of lines that will be joined
61 together with newlines to form the file content.
62
63 content_is_template, is_template
64 This attribute is a bool indicating whether or not the content should
65 be treated as a Text::Template template. By default, it is false.
66
67 name_is_template
68 This attribute is a bool indicating whether or not the filename should
69 be treated as a Text::Template template. By default, it is false.
70
72 Ricardo SIGNES 😏 <rjbs@semiotic.systems>
73
75 This software is copyright (c) 2021 by Ricardo SIGNES.
76
77 This is free software; you can redistribute it and/or modify it under
78 the same terms as the Perl 5 programming language system itself.
79
80
81
82perl v5.34.0 2021-07-2D2ist::Zilla::Plugin::GenerateFile(3)