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.103013
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          __[ NOTICE ]__
47          Copyright (C) 2000-2002 by P.R. Evious
48          Copyright (C) {{$self->year}} by {{$self->holder}}.
49
50          This is free software, licensed under {{$self->name}}.
51
52          __[ LICENSE ]__
53                      The Foo-Bar License
54
55          Well... this is only some sample text.  Verily... only sample text!!!
56
57          Yes, spanning more lines and more paragraphs.
58
59       The different formats for specifying the section name in the example
60       above are only examples, you're invited to use a consistent approach.
61

METHODS

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

MORE METHODS

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

AUTHOR

110       Ricardo Signes <rjbs@cpan.org>
111
113       This software is copyright (c) 2017 by Ricardo Signes.
114
115       This is free software; you can redistribute it and/or modify it under
116       the same terms as the Perl 5 programming language system itself.
117
118
119
120perl v5.26.3                      2017-10-27      Software::License::Custom(3)
Impressum