Softwa...pyright(3pm)

πŸ“¦
version 0.015 Β· 3 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

✨ NAME ✨

okay so bestie, welcome to Software::Copyright (you'll see it filed under Softwa...pyright(3pm) in the User Contributed Perl Documentation, the name got chopped, it's fine, we move) β€” it's the Copyright class πŸ’– and it's here to hold your copyright statements so you don't have to.


πŸŽ€ VERSION πŸŽ€

version 0.015 β€” yes queen, we're on that version 0.015 ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

use Software::Copyright;

my $copyright = Software::Copyright->new('2020,2021, Joe <joe@example.com>');

# stringification
my $s = "$copyright"; # => is "2020, 2021, Joe <joe\@example.com>"

# add with merge
$copyright->merge('2018-2020 Averell');

# after addition
$s = "$copyright"; # => is "2020, 2021, Joe <joe@example.com>\n2018-2020, Averell"

# merge statement which adds email
$copyright->merge('2016, Averell <averell@example.com>');

$s = "$copyright"; # => is "2020, 2021, Joe <joe@example.com>\n2016, 2018-2020, Averell <averell\@example.com>"

look at that merge glow-up, it literally added the email for Averell and stacked the years in order, obsessed 🫢


🌸 DESCRIPTION 🌸

This class holds a copyright statement, i.e. a set of year range, name and email. that's the whole vibe. it's a little container for "who owns this and since when" and it's lowkey iconic for it πŸ’…


πŸ› οΈ CONSTRUCTOR πŸ› οΈ

The constructor is called with a copyright statement string. that string can be spread on several lines, no drama. And it's also compatible with the string given by Debian's licensecheck, i.e. the statements can be separated by ""/"". so if licensecheck hands you something, this constructor is like "say less" 😌

🌟 Methods 🌟

statement

Get the Software::Copyright::Statement object of a given user. πŸŽ€

statement_list

Returns a list of Software::Copyright::Statement object for all users. everybody gets a statement, no one left out 🫢

stringify

Returns a string containing a cleaned up copyright statement. ✨

is_valid

Returns true if the copyright contains valid records, i.e. records with names. no name, no validity, sorry bestie πŸ’€

owners

Return a list of statement owners. An owner is either a name or a record.

statement

Returns the Software::Copyright::Statement object for the given owner:

my $statement = $copyright->statement('Joe Dalton');

(yes, statement shows up twice in this list, that's just how the page is written, iykyk, not my business to fix πŸ’…)

merge

Merge in a statement. This statement is either merged with a existing statement when the owner match or appended to the list of statements.

The statement parameter can either be a string or an Software::Copyright::Statement object. either way, it slides right in ✨

contains

Return 1 if the other copyright is contained in current copyright, i.e. all other statements are contained in current statements (See "contains" in Copyright::Statement for details on statement containment).

For instance:

  • "2016, Joe" copyright is contained in "2014-2020, Joe" copyright.
  • "2016, Joe" is contained in "2014-2020, Joe / 2019, Jack"
  • "2010, Joe" is not contained in "2014-2020, Joe"

see how the last one just doesn't fit the range? vibe check failed, respectfully πŸ“


🌈 Operator overload 🌈

Operator "", eq and ne are overloaded. string magic, slay ✨


πŸ¦„ See also πŸ¦„

Software::Copyright::Statement, Software::Copyright::Owner


πŸ‘‘ AUTHOR πŸ‘‘

Dominique Dumont


This software is Copyright (c) 2022 by Dominique Dumont <dod@debian.org>.

This is free software, licensed under:

The GNU General Public License, Version 3, June 2007

and that's the whole page bestie, thanks for reading 🫢 this was perl v5.40.1, dated 2025-04-07, brought to you by the Softwa...pyright(3pm) page itself β€” periodt πŸ’…βœ¨

πŸ“¦ where this page comes from