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.103014
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

METHODS

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

MORE METHODS

88       The following methods, found in all software license classes, look up
89       and render the template with the capitalized form of their name.  In
90       other words, the "license" method looks in the "LICENSE" template.
91
92       For now, the "meta_name" and "meta2_name" methods return "custom" if
93       called on the class.  This may become fatal in the future.
94
95       ·   name
96
97       ·   url
98
99       ·   meta_name
100
101       ·   meta2_name
102
103       ·   license
104
105       ·   notice
106
107       ·   fulltext
108
109       ·   version
110

AUTHOR

112       Ricardo Signes <rjbs@cpan.org>
113
115       This software is copyright (c) 2018 by Ricardo Signes.
116
117       This is free software; you can redistribute it and/or modify it under
118       the same terms as the Perl 5 programming language system itself.
119
120
121
122perl v5.32.0                      2020-07-28      Software::License::Custom(3)
Impressum