.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Software::LicenseUtils 3pm" .TH Software::LicenseUtils 3pm "2022-06-27" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Software::LicenseUtils \- little useful bits of code for licensey things .SH "VERSION" .IX Header "VERSION" version 0.104002 .SH "PERL VERSION" .IX Header "PERL VERSION" This module is part of \s-1CPAN\s0 toolchain, or is treated as such. As such, it follows the agreement of the Perl Toolchain Gang to require no newer version of perl than v5.8.1. This version may change by agreement of the Toolchain Gang, but for now is governed by the Lancaster Consensus of 2013. .SH "METHODS" .IX Header "METHODS" .SS "guess_license_from_pod" .IX Subsection "guess_license_from_pod" .Vb 1 \& my @guesses = Software::LicenseUtils\->guess_license_from_pod($pm_text); .Ve .PP Given text containing \s-1POD,\s0 like a .pm file, this method will attempt to guess at the license under which the code is available. This method will return either a list of Software::License classes names (as strings) or false. .PP This method looks for a \s-1POD\s0 heading like 'license', 'copyright', or 'legal'. .PP Calling this method in scalar context is a fatal error. .SS "guess_license_from_meta" .IX Subsection "guess_license_from_meta" .Vb 1 \& my @guesses = Software::LicenseUtils\->guess_license_from_meta($meta_str); .Ve .PP Given the content of the \s-1META.\s0(yml|json) file found in a \s-1CPAN\s0 distribution, this method makes a guess as to which licenses may apply to the distribution. It will return a list of zero or more Software::License instances or classes. .SS "guess_license_from_meta_key" .IX Subsection "guess_license_from_meta_key" .Vb 1 \& my @guesses = Software::LicenseUtils\->guess_license_from_meta_key($key, $v); .Ve .PP This method returns zero or more Software::License classes known to use \f(CW$key\fR as their \s-1META\s0 key. If \f(CW$v\fR is supplied, it specifies whether to treat \f(CW$key\fR as a v1 or v2 meta entry. Any value other than 1 or 2 will raise an exception. .SS "new_from_short_name" .IX Subsection "new_from_short_name" .Vb 4 \& my $license_object = Software::LicenseUtils\->new_from_short_name( { \& short_name => \*(AqGPL\-1\*(Aq, \& holder => \*(AqX. Ample\*(Aq \& }) ; .Ve .PP Create a new Software::License object from the license specified with \f(CW\*(C`short_name\*(C'\fR. Known short license names are \f(CW\*(C`GPL\-*\*(C'\fR, \f(CW\*(C`LGPL\-*\*(C'\fR , \&\f(CW\*(C`Artistic\*(C'\fR and \f(CW\*(C`Artistic\-*\*(C'\fR .SS "new_from_spdx_expression" .IX Subsection "new_from_spdx_expression" .Vb 4 \& my $license_object = Software::LicenseUtils\->new_from_spdx_expression( { \& spdx_expression => \*(AqMPL\-2.0\*(Aq, \& holder => \*(AqX. Ample\*(Aq \& }) ; .Ve .PP Create a new Software::License object from the license specified with \f(CW\*(C`spdx_expression\*(C'\fR. Some licenses doesn't have an spdx identifier (for example Software::License::Perl_5), so you can pass spdx identifier but also expressions. Known spdx license identifiers are \f(CW\*(C`BSD\*(C'\fR, \f(CW\*(C`MPL\-1.0\*(C'\fR. .SH "AUTHOR" .IX Header "AUTHOR" Ricardo Signes .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2022 by Ricardo Signes. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.