String...g::SPDX(3pm)

πŸ“¦
version 0.0.11 Β· 6 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– 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 a String::License::Naming object.

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 Β© 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 line 103: '=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