| Software::Copyright::Owner(3pm) | User Contributed Perl Documentation | Software::Copyright::Owner(3pm) |
Software::Copyright::Owner - Copyright owner class
version 0.012
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'
This class holds the name and email of a copyright holder.
The constructor can be called without argument or with a string containing a name and an optional email address. E.g:
my $owner = Software::Copyright::Owner->new();
my $owner = Software::Copyright::Owner->new('Joe');
my $owner = Software::Copyright::Owner->new('Joe <joe@example.com>');
It can also be called with copyright assignment involving more than one person. See synopsis for details.
Set or get owner's name. Note that names with Unicode characters are normalized to Canonical Composition (NFC). Name can be empty when the copyright owners has more that one name (i.e. "John Doe and Jane Doe") or if the string passed to "new()" contains unexpected information (like a year).
Set or get the record of a copyright. The record is set by constructor when the owner contains more than one name or if the owner contains unexpected information.
Returns "name" or "record".
Set or get owner's email
Returns a string containing name (or record) and email (if any) of the copyright owner.
Operator "" is overloaded to call "stringify".
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
| 2023-10-10 | perl v5.36.0 |