String...g::SPDX(3pm)
π String::License::Naming::SPDX β the manual, but make it slay π
okay bestie, you found it: the String...g::SPDX(3pm) page, aka String::License::Naming::SPDX from the User Contributed Perl Documentation section. Sit down, hydrate, and let's get into it π«Ά
β¨ NAME β¨
String::License::Naming::SPDX β licenses, but named the way SPDX names them π
πΈ VERSION πΈ
Version v0.0.11 β that's the one, no cap.
π¦ SYNOPSIS π¦
the vibe check, in code form:
use String::License::Naming::SPDX;
my $spdx = String::License::Naming::SPDX->new;
my $license = [ grep { /^(Expat|Perl)$/ } $spdx->list_licenses ]; # => is_deeply ['Perl']
so you make a $spdx object, you ask it for its license list, you grep that list for names matching /^(Expat|Perl)$/... and the result is literally just ['Perl']. iconique. β¨
π DESCRIPTION π
okay so here's the whole situation, bestie:
String::License::Naming enumerates supported licenses matching an ordered set of naming schemes, or it enumerates the names of supported license naming schemes. Either way β it's your girl for matching up license names across schemes. π
Here's the tea: some licenses are known by different names. Like, the license "MIT" according to SPDX? In Debian it's named "Expat". Wild, right?? π
And also β some licenses are not always represented. For example, "Perl" is a (lowkey discouraged π) license in Debian, while with SPDX it's a relationship of several licenses β and tbh that whole expression is recommended in Debian too. So it's giving "same energy, different packaging". π
By default? Licenses get matched using naming schemes "[ 'spdx', 'internal' ]" β which means it lists all supported licenses, preferably by their SPDX name, or as a fallback, by an internal name. Preferrably. Yes bestie, that's exactly how the original spells it, we don't touch the details. π
π CONSTRUCTOR π
newβ Constructs and returns aString::License::Namingobject.
Here's the lil bonus detail, bestie: it includes all licenses defined by SPDX, and presents each one by its SPDX shortname. So you never get a mystery name with no vibe. π
π₯ FUNCTIONS π₯
list_schemesβ Returns a list of license naming schemes in use. That's it. That's the whole function. Serving simplicity. πlist_licensesβ Returns a list of all licensing patterns covered by SPDX, each one labeled by its SPDX shortname. Every single one, tagged and ready. β
π AUTHOR π
Jonas Smedegaard "<dr@jones.dk>" β the genius behind all this. Respect. π«Ά
π COPYRIGHT AND LICENSE π
Copyright Β© 2023 Jonas Smedegaard
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3, or (at your option) any later version. fr fr, your choice bestie. π
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. Not me yelling that part β that's literally how it's written, and it matters. π See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. Go get it, bestie, it's free (as in freedom β¨).
π POD ERRORS π
okay so. not everything ate, sadly. The above document had some coding errors, which are explained below:
Around line103:'=item' outside of any '=over'
that's the whole error report β an =item that wandered off outside its =over. It's giving lost in the group chat with no thread to reply to. π The docs still ate though, let's be real.
and that's the whole page, bestie β no skips, no crumbs left behind. this was String...g::SPDX(3pm) from perl v5.40.0, dated 2024-11-05. mwah π stay gay, stay slay, and always read your licenses fr fr πβ¨ππ¦
π¦ where this page comes from
- ubuntu resolute: libstring-license-perl 0.0.11-1ubuntu1 Β· AGPL-3.0-or-later
- ubuntu stonking: libstring-license-perl 0.0.11-1ubuntu1 Β· AGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms