1Software::License::CustUosme(r3)Contributed Perl DocumenStoafttiwoanre::License::Custom(3)
2
3
4

NAME

6       Software::License::Custom - custom license handler
7

VERSION

9       version 0.104004
10

DESCRIPTION

12       This module extends Software::License to give the possibility of
13       specifying all aspects related to a software license in a custom file.
14       This allows for setting custom dates, notices, etc. while still
15       preserving compatibility with all places where Software::License is
16       used, e.g. Dist::Zilla.
17
18       In this way, you should be able to customise some aspects of the
19       licensing messages that would otherwise be difficult to tinker, e.g.
20       adding a note in the notice, setting multiple years for the copyright
21       notice or set multiple authors and/or copyright holders.
22
23       The license details should be put inside a file that contains different
24       sections. Each section has the following format:
25
26       header line
27           This is a line that begins and ends with two underscores "__". The
28           string between the begin and the end of the line is first depured
29           of any non-word character, then used as the name of the section;
30
31       body
32           a Text::Template (possibly a plain text file) where items to be
33           expanded are enclosed between double braces
34
35       Each section is terminated by the header of the following section or by
36       the end of the file. Example:
37
38          __[ NAME ]__
39          The Foo-Bar License
40          __URL__
41          http://www.example.com/foo-bar.txt
42          __[ META_NAME ]__
43          foo_bar_meta
44          __{ META2_NAME }__
45          foo_bar_meta2
46          __{ SPDX_EXPRESSION }__
47          foo_bar_spdx_expression
48          __[ NOTICE ]__
49          Copyright (C) 2000-2002 by P.R. Evious
50          Copyright (C) {{$self->year}} by {{$self->holder}}.
51
52          This is free software, licensed under {{$self->name}}.
53
54          __[ LICENSE ]__
55                      The Foo-Bar License
56
57          Well... this is only some sample text.  Verily... only sample text!!!
58
59          Yes, spanning more lines and more paragraphs.
60
61       The different formats for specifying the section name in the example
62       above are only examples, you're invited to use a consistent approach.
63

PERL VERSION

65       This module is part of CPAN toolchain, or is treated as such.  As such,
66       it follows the agreement of the Perl Toolchain Gang to require no newer
67       version of perl than one released in the last ten years.  This version
68       may change by agreement of the Toolchain Gang, but for now is governed
69       by the Lancaster Consensus <https://github.com/Perl-Toolchain-
70       Gang/toolchain-site/blob/master/lancaster-consensus.md> of 2013 and the
71       Lyon Amendment of 2023 (described at the linked-to document).
72
73       Although it may work on older versions of perl, no guarantee is made
74       that the minimum required version will not be increased.  The version
75       may be increased for any reason, and there is no promise that patches
76       will be accepted to lower the minimum required perl.
77

METHODS

79   new
80          my $slc = Software::License::Custom->new({filename => 'LEGAL'});
81
82       Create a new object. Arguments are passed through an anonymous hash,
83       the following keys are allowed:
84
85         filename - the file where the custom software license details are stored
86
87   load_sections_from
88          $slc->load_sections_from('MY-LEGAL-ASPECTS');
89
90       Loads the different sections of the license from the provided filename.
91
92       Returns the input object.
93
94   section_data
95          my $notice_template_reference = $slc->section_data('NOTICE');
96
97       Returns a reference to a textual template that can be fed to
98       Text::Template (it could be simple text), according to what is
99       currently loaded in the object.
100

MORE METHODS

102       The following methods, found in all software license classes, look up
103       and render the template with the capitalized form of their name.  In
104       other words, the "license" method looks in the "LICENSE" template.
105
106       For now, the "meta_name" and "meta2_name" methods return "custom" if
107       called on the class.  This may become fatal in the future.
108
109       •   name
110
111       •   url
112
113       •   meta_name
114
115       •   meta2_name
116
117       •   license
118
119       •   notice
120
121       •   fulltext
122
123       •   version
124

AUTHOR

126       Ricardo Signes <rjbs@semiotic.systems>
127
129       This software is copyright (c) 2023 by Ricardo Signes.
130
131       This is free software; you can redistribute it and/or modify it under
132       the same terms as the Perl 5 programming language system itself.
133
134
135
136perl v5.38.0                      2023-07-21      Software::License::Custom(3)
Impressum