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.104002
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 v5.8.1.  This version may change by agreement of
68       the Toolchain Gang, but for now is governed by the Lancaster Consensus
69       <https://github.com/Perl-Toolchain-Gang/toolchain-
70       site/blob/master/lancaster-consensus.md> of 2013.
71

METHODS

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

MORE METHODS

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

AUTHOR

120       Ricardo Signes <rjbs@semiotic.systems>
121
123       This software is copyright (c) 2022 by Ricardo Signes.
124
125       This is free software; you can redistribute it and/or modify it under
126       the same terms as the Perl 5 programming language system itself.
127
128
129
130perl v5.36.0                      2023-01-20      Software::License::Custom(3)
Impressum