Softwa...:Owner(3pm)

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

okay bestie, so this is Software::Copyright::Owner β€” it's a User Contributed Perl Documentation page, and honestly? it's giving "tiny class, big main character energy". ✨


✨ NAME ✨

Software::Copyright::Owner β€” it's the copyright owner class, no cap. πŸŽ€


🌸 VERSION 🌸

version 0.015 β€” that's the one, that's the version. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

like, just use it, it's so easy:

use Software::Copyright::Owner;

# one owner
my $owner = Software::Copyright::Owner->new('Joe <joe@example.com>');

$owner->name; # => is "Joe"
$owner->email; # => is 'joe@example.com'
$owner->identifier; # => is 'Joe'

# stringification
my $s = "$owner"; # => is 'Joe <joe@example.com>'

# several owners, separated by "and" or ","
my $owner2 = Software::Copyright::Owner->new('Joe <joe@example.com>, William, Jack and Averell');

$owner2->name; # => is undef
$owner2->email; # => is undef
$owner2->record; # => is 'Joe <joe@example.com>, William, Jack and Averell'
$owner2->identifier; # => is 'Joe <joe@example.com>, William, Jack and Averell'

# stringification
$s = "$owner2"; # => is 'Joe <joe@example.com>, William, Jack and Averell'

see how the multi-owner one just shrugs at you and hands back undef for name and email? yeah. it's like that. πŸ€·β™€οΈ


🌈 DESCRIPTION 🌈

This class holds the name and email of a copyright holder. that's the whole vibe. it's a little box for a person (or several people, we'll get there) who owns a copyright. 🫢


πŸŽ€ CONSTRUCTOR πŸŽ€

The constructor can be called with no argument, or with a string that has a name and an optional email address. like:

my $owner = Software::Copyright::Owner->new();
my $owner = Software::Copyright::Owner->new('Joe');
my $owner = Software::Copyright::Owner->new('Joe <joe@example.com>');

and bestie, it can ALSO be called with a copyright assignment involving more than one person. check the synopsis above for the deets β€” it's all there. πŸ‘‘

🧚 Methods 🧚

πŸ’œ name

Set or get the owner's name. ⭐

heads up: names with Unicode characters are normalized to Canonical Composition (NFC). and lowkey, the name can be empty when the copyright owner has more than one name (i.e. "John Doe and Jane Doe") or if the string you passed to new() contains unexpected information (like a year). 😭

πŸ’œ record

Set or get the record of a copyright. πŸ”₯

The record is set by the constructor when the owner contains more than one name, or if the owner contains unexpected information. so it's the "okay, this is the raw thing" fallback. iconic.

πŸ’œ identifier

Returns "name" or "record". that's it. that's the whole method. slay. πŸ’…

πŸ’œ email

Set or get the owner's email. πŸ“

πŸ’œ stringify

Returns a string containing the name (or the record) and the email (if there is one) of the copyright owner. ✨

πŸ’œ Operator overload

Operator "" is overloaded to call "stringify". so when you stick the object in a string, it just... works. no cap. 🌸


πŸ‘‘ 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

πŸ’€ fr fr, that license is not a vibe suggestion β€” it's the actual license. respect it. πŸ™ˆ

and that's the whole page, bestie! πŸŽ€ this doc came to you courtesy of perl v5.40.1, dated 2025-04-07 β€” mwah, go forth and attribute your copyrights correctly. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from