Softwa...tement(3pm)
π Software::Copyright::Statement β a copyright statement for one owner π
okay bestie, so this is Software::Copyright::Statement, a Perl module (manual section 3pm, user contributed perl docs, iykyk) and it is literally the single most put-together little class you'll ever meet. One owner, one statement: years, name, email. That's it. That's the whole vibe. π
VERSION: version 0.015 β yes queen, tiny version number, massive energy. π
β¨ SYNOPSIS β¨
use Software::Copyright::Statement;
my $statement = Software::Copyright::Statement->new('2020,2021, Joe <joe@example.com>');
$statement->name; # => is "Joe"
$statement->email; # => is 'joe@example.com'
$statement->range; # => is '2020, 2021'
# merge records
$statement->merge(Software::Copyright::Statement->new('2022, Joe <joe@example.com>'));
$statement->range; # => is '2020-2022'
# update the year range
$statement->add_years('2015, 2016-2019')->stringify; # => is '2015-2022, Joe <joe@example.com>'
# stringification
my $string = "$statement"; # => is '2015-2022, Joe <joe@example.com>'
# test if a statement "contains" another one
my $st_2020 = Software::Copyright::Statement->new('2020, Joe <joe@example.com>');
$statement->contains($st_2020); # => is '1'
like. look at it. it ate. π
πΈ DESCRIPTION πΈ
This class holds one copyright statement, which is to say: the year range, the name, and the email of exactly one copyright contributor. One owner, one statement, no chaos, no drama. π¦
And here's the cute part β when you construct one of these, it does a lil cleanup pass so your statement comes out more standard. It's giving "let me fix your formatting, bestie." Some cleanup examples, fr fr:
2002-6 Joe => 2002-2006, Joe
2001,2002,2003,2004 Joe => 2001-2004, Joe
# found in markdown documents
2002 Joe mailto:joe@example.com => 2002, Joe <joe@example.com>
π CONSTRUCTOR π
You can call the constructor with no argument at all, or with a string containing:
- a year range (this one's optional, she's flexible)
- a name (mandatory β no name, no statement, periodt)
- an email address (optional, but like⦠include it, it's cute)
E.g:
my $st = Software::Copyright::Statement->new();
my $st = Software::Copyright::Statement->new('2002, Joe <joe@example.com>');
Methods π«
name
Set or get owner's name. Simple. Iconic.
email
Set or get owner's name.
not me double-checking this one β yes, the original really does say "owner's name" here too, even though it's the email method. keeping it exactly as written because the facts stay, always. ππ
owner
Returns a Software::Copyright::Owner object. And the tea is: this object can be used as a string. π«Ά
merge
Merge 2 statements. Heads up though β the 2 statements must belong to the same owner (meaning the name attributes have to be identical, no negotiating).
See the Synopsis for an example, bestie.
This method returns $self. π
add_years
Add a year range to the copyright owner. This method accepts year ranges like "2020", "2018, 2020", "2016-2020,2022". White spaces are ignored β she does not see them, she does not care about them. β¨
This method returns $self. π
stringify
Returns a string containing a year range (if any), a name and email (if any) of the copyright owner. Basically the whole glow-up in string form. π
contains
Return 1 if the other statement is contained in the current statement β i.e. owner or record are identical, and the other year range is contained in the current year range.
For instance:
"2016, Joe"is contained in"2014-2020, Joe"β"2010, Joe"is not contained in"2014-2020, Joe"β
Operator overload
Operator "" is overloaded to call "stringify". So when you interpolate her, she justβ¦ stringifies. Main character behavior, honestly. π
π 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 π«Ά this was perl v5.40.1, dated 2025-04-07, from the Softwa...tement(3pm) page β go forth and copyright responsibly, mwah πβ¨
π¦ 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