NAME
Software::Copyright::Owner - Copyright owner class
VERSION
version 0.015
SYNOPSIS
use Software::Copyright::Owner;# one ownermy $owner = Software::Copyright::Owner->new('Joe <[email protected]>');$owner->name; # => is "Joe"$owner->email; # => is '[email protected]'$owner->identifier; # => is 'Joe'# stringificationmy $s = "$owner"; # => is 'Joe <[email protected]>'# several owners, separated by "and" or ","my $owner2 = Software::Copyright::Owner->new('Joe <[email protected]>, William, Jack and Averell');$owner2->name; # => is undef$owner2->email; # => is undef$owner2->record; # => is 'Joe <[email protected]>, William, Jack and Averell'$owner2->identifier; # => is 'Joe <[email protected]>, William, Jack and Averell'# stringification$s = "$owner2"; # => is 'Joe <[email protected]>, William, Jack and Averell'
DESCRIPTION
This class holds the name and email of a copyright holder.
CONSTRUCTOR
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 <[email protected]>');
It can also be called with copyright assignment involving more than one person. See synopsis for details.
Methods
name
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).
record
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.
identifier
Returns "name" or "record".
Set or get owner's email
stringify
Returns a string containing name (or record) and email (if any) of the copyright owner.
Operator overload
Operator "" is overloaded to call "stringify".
AUTHOR
Dominique Dumont
COPYRIGHT AND LICENSE
This software is Copyright (c) 2022 by Dominique Dumont <[email protected]>.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007