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

AUTHOR

60       Ricardo Signes <rjbs@cpan.org>
61
63       This software is copyright (c) 2018 by Ricardo Signes.
64
65       This is free software; you can redistribute it and/or modify it under
66       the same terms as the Perl 5 programming language system itself.
67
68
69
70perl v5.30.0                      2019-07-26         Software::LicenseUtils(3)
Impressum