Regexp::Pattern::License(3pm) | User Contributed Perl Documentation | Regexp::Pattern::License(3pm) |
Regexp::Pattern::License - Regular expressions for legal licenses
Version v3.9.4
use Regexp::Pattern::License; use Regexp::Pattern; my $string = 'GNU General Public License version 3 or later'; print "Found!\n" if $string =~ re( 'License::gpl_3' ); # prints "Found!"
Regexp::Pattern::License provides a hash of regular expression patterns related to legal software licenses.
Regexp::Pattern is a convention for organizing reusable regex patterns.
Patterns each covering a single trait occuring in licenses.
Each of these patterns has the tag type:trait .
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.1.92.
Since v3.3.0.
Since v3.3.0.
Since v3.3.0.
Since v3.3.0.
Since v3.3.0.
Since v3.3.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.6.0.
Since v3.4.0.
Since v3.7.0.
Since v3.7.0.
Since v3.7.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.4.0.
Since v3.6.0.
Since v3.4.0.
Since v3.4.0.
Since v3.9.0.
Since v3.1.100.
Since v3.1.92.
Since v3.1.92.
Since v3.2.0.
Since v3.1.92.
Since v3.1.92.
Patterns each covering a single license.
Each of these patterns has exactly one of these tags: type:unversioned type:versioned:decimal type:singleversion:* type:usage:*:* .
Since v3.1.95.
Since v3.1.95.
Since v3.1.95.
Since v3.1.95.
Since v3.1.95.
Since v3.1.102.
Since v3.1.91.
Since v3.1.91.
Since v3.1.95.
Since v3.1.95.
Since v3.1.95.
Since v3.1.95.
Since v3.1.95.
Since v3.1.95.
Since v3.1.0.
Since v3.1.0.
Since v3.5.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.9.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.9.0.
Since v3.7.0.
Since v3.8.0.
Since v3.1.90.
Since v3.1.90.
Since v3.5.0.
Since v3.5.0.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.7.0.
Since v3.7.0.
Since v3.1.101.
Since v3.1.101.
Since v3.7.0.
Since v3.7.0.
Since v3.7.0.
Since v3.7.0.
Since v3.7.0.
Since v3.7.0.
Since v3.1.101.
Since v3.1.101.
Since v3.7.0.
Since v3.7.0.
Since v3.7.0.
Since v3.1.101.
Since v3.1.101.
Since v3.7.0.
Since v3.7.0.
Since v3.7.0.
Since v3.1.101.
Since v3.1.101.
Since v3.1.95.
Since v3.1.95.
Since v3.8.0.
Since v3.8.0.
Since v3.1.101.
Since v3.1.101.
Since v3.8.0.
Since v3.5.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.7.0.
Since v3.7.0.
Since v3.6.0.
Since v3.6.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.6.0.
Since v3.6.0.
Since v3.8.0.
Since v3.3.0.
Since v3.3.0.
Since v3.3.0.
Since v3.7.0.
Since v3.7.0.
Since v3.6.0.
Since v3.6.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.5.0.
Since v3.6.0.
Since v3.5.0.
Since v3.1.90.
Since v3.1.90.
Since v3.1.90.
Since v3.8.0.
Since v3.1.0.
Since v3.8.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.7.0.
Since v3.6.0.
Since v3.7.0.
Since v3.7.0.
Since v3.7.0.
Since v3.7.0.
Since v3.7.0.
Since v3.7.0.
Since v3.5.0.
Since v3.8.0.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.8.0.
Since v3.8.0.
Since v3.5.0.
Since v3.5.0.
Since v3.5.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.8.0.
Since v3.8.0.
Since v3.6.0.
Since v3.6.0.
Since v3.8.0.
Since v3.8.0.
Since v3.6.0.
Since v3.6.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.1.101.
Since v3.2.0.
Since v3.2.0.
Since v3.1.101.
Since v3.2.0.
Since v3.2.0.
Since v3.6.0.
Since v3.6.0.
Since v3.5.0.
Since v3.5.0.
Since v3.5.0.
Since v3.5.0.
Since v3.5.0.
Since v3.5.0.
Since v3.5.0.
Since v3.5.0.
Since v3.5.0.
Since v3.5.0.
Since v3.5.0.
Since v3.5.0.
Since v3.5.0.
Since v3.5.0.
Since v3.5.0.
Since v3.5.0.
Since v3.5.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.9.0.
Since v3.1.95.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.1.101.
Since v3.1.101.
Since v3.1.101.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.5.0.
Since v3.5.0.
Since v3.5.0.
Since v3.6.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.2.0.
Since v3.8.0.
Since v3.6.0.
Since v3.8.0.
Since v3.8.0.
Since v3.6.0.
Since v3.6.0.
Since v3.9.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.8.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.6.0.
Since v3.8.0.
Since v3.1.95.
Since v3.1.95.
Since v3.1.95.
Since v3.1.95.
Since v3.6.0.
Since v3.8.0.
Since v3.8.0.
Since v3.6.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.8.0.
Since v3.1.102.
Since v3.1.102.
Since v3.1.102.
Since v3.1.102.
Since v3.1.102.
Patterns each covering a combination of multiple licenses.
Each of these patterns has the tag type:combo .
Since v3.6.0.
Since v3.9.0.
Patterns each covering either of multiple licenses.
Each of these patterns has the tag type:group .
Since v3.6.0.
The regexp patterns follows the DefHash specification, and more specifically the structure of Regexp::Pattern, defining access to one pattern per DefHash object, as "pat".
Additionally, (sub)patterns are available in plaintext form, as "pat.alt.*".
Each pattern targets one or more subjects, i.e. ways to directly or indirectly represent a license.
Beware that not all pattern objects fully cover all subjects.
Coverage for this subject is currently rather weak.
Texts containing both license grant and licensing terms (e.g. BSD- and MIT-style licensing) may be classified as either subject grant or subject license. This may change, as needs for distinction is better understood.
Each pattern can process material within some scope, i.e. a certain sample size of the full subject.
As an example, <https://codesearch.debian.net/> use line-based processing, where patterns spanning multiple lines are not applicable.
May span multiple lines, but not across multiple sentences. Typically this means no full-stop or colon within scope.
May span multiple sentences, but not multiple paragraphs. Typically this means no newline within scope.
May span multiple paragraphs, but not multiple sections. Typically this means blank line within scope.
License objects obsoleted by improved coverage of other objects, and provided only as dummy objects.
Since v3.9.0.
Replaced by "psf_2" and "python_2".
Since v3.9.0.
Replaced by "wordnet".
Pattern defhashes optionally includes tags, which may help in selecting multiple related patterns.
Tags are hierarchical, with ":" as separator, and may be extended without notice. Therefore take care to permit sub-parts when tag-matching, e.g. using a regex like " /\Asome:tag(?:\z|:)/ ".
Pattern covers a license part of a family of licenses.
License mentions a preferred form for granting the license.
This implies that license is commonly granted by use of a different (typically far shorter) text.
Fourth part (optional) is the key to corresponding license pattern, for a grant belonging to a different license (when omitted then a grant for same license is assumed).
License contains another license.
Wildcard is the key to corresponding license pattern.
License mentions name of another license.
License references coverage of another license.
Wildcard is the key to corresponding license pattern.
License is commonly granted by stating the whole license.
License grant may include an "as published by..." reference.
Third part is the key to corresponding trait pattern.
Pattern covers an "as published by ..." license grant phrase.
Third part (optional) is the key to corresponding license pattern.
Pattern covers a specific usage of a license.
Third part is the key of the corresponding non-usage-specific pattern.
Fourth part is the key of the corresponding usage trait pattern.
Pattern covers a combination of multiple licenses.
Pattern covers either of multiple licenses.
Pattern covers a specific version of a license.
Third part is the key of the corresponding non-version-specific pattern.
Pattern covers a single trait occuring in licenses.
Pattern covers a license without versioning scheme.
Pattern covers a license using decimal number versioning scheme.
The "official" way to browse patterns is using App::RegexpPatternUtils:
show-regexp-pattern-module --page-result -- License
Unfortunately, App::RegexpPatternUtils has a deep dependency tree. An alternative is to use Data::Printer and "less":
perl -CS -MRegexp::Pattern::License -MDDP -e 'p %Regexp::Pattern::License::RE, fulldump => 1, output => stdout' | less -RS
Jonas Smedegaard "<dr@jones.dk>"
Copyright © 2016-2021 Jonas Smedegaard Copyright © 2017-2021 Purism SPC
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
2022-12-05 | perl v5.36.0 |