1Software::LicenseUtils(U3s)er Contributed Perl DocumentatSioofntware::LicenseUtils(3)
2
3
4

NAME

6       Software::LicenseUtils - little useful bits of code for licensey things
7

VERSION

9       version 0.104001
10

METHODS

12   guess_license_from_pod
13         my @guesses = Software::LicenseUtils->guess_license_from_pod($pm_text);
14
15       Given text containing POD, like a .pm file, this method will attempt to
16       guess at the license under which the code is available.  This method
17       will return either a list of Software::License classes names (as
18       strings) or false.
19
20       This method looks for a POD heading like 'license', 'copyright', or
21       'legal'.
22
23       Calling this method in scalar context is a fatal error.
24
25   guess_license_from_meta
26         my @guesses = Software::LicenseUtils->guess_license_from_meta($meta_str);
27
28       Given the content of the META.(yml|json) file found in a CPAN
29       distribution, this method makes a guess as to which licenses may apply
30       to the distribution.  It will return a list of zero or more
31       Software::License instances or classes.
32
33   guess_license_from_meta_key
34         my @guesses = Software::LicenseUtils->guess_license_from_meta_key($key, $v);
35
36       This method returns zero or more Software::License classes known to use
37       $key as their META key.  If $v is supplied, it specifies whether to
38       treat $key as a v1 or v2 meta entry.  Any value other than 1 or 2 will
39       raise an exception.
40
41   new_from_short_name
42         my $license_object = Software::LicenseUtils->new_from_short_name( {
43            short_name => 'GPL-1',
44            holder => 'X. Ample'
45         }) ;
46
47       Create a new Software::License object from the license specified with
48       "short_name". Known short license names are "GPL-*", "LGPL-*" ,
49       "Artistic" and "Artistic-*"
50
51   new_from_spdx_expression
52         my $license_object = Software::LicenseUtils->new_from_spdx_expression( {
53            spdx_expression => 'MPL-2.0',
54            holder => 'X. Ample'
55         }) ;
56
57       Create a new Software::License object from the license specified with
58       "spdx_expression". Some licenses doesn't have an spdx identifier (for
59       example Software::License::Perl_5), so you can pass spdx identifier but
60       also expressions.  Known spdx license identifiers are "BSD", "MPL-1.0".
61

AUTHOR

63       Ricardo Signes <rjbs@semiotic.systems>
64
66       This software is copyright (c) 2021 by Ricardo Signes.
67
68       This is free software; you can redistribute it and/or modify it under
69       the same terms as the Perl 5 programming language system itself.
70
71
72
73perl v5.34.0                      2021-08-03         Software::LicenseUtils(3)
Impressum