Softwa...pyright(3pm)
β¨ 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
π COPYRIGHT AND LICENSE π
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
- debian trixie: libsoftware-copyright-perl 0.015-1 Β· GPL-3.0-only
- ubuntu resolute: libsoftware-copyright-perl 0.015-1 Β· GPL-3.0-only
- ubuntu stonking: libsoftware-copyright-perl 0.015-1 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms