Database/Actor.pm

filter: Statementstmt 100% 11 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 100% 1 / 1 totaltotal 100% 15 / 15 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
ident
1.0
CRAP 1.0
« Database/Role/RefReader.pm ↑ Summary Database/Backend/Cogit.pm »
1 package Git::Database::Actor;
2 22 $Git::Database::Actor::VERSION = '0.012';
3 22 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 22 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 22 has name => (
7 is => 'ro',
8 required => 1,
9 );
10  
11 22 has email => (
12 is => 'ro',
13 required => 1,
14 );
15  
16 1290 ▶sub ident { $_[0]->name . ' <' . $_[0]->email . '>' }
Subroutine ident: called CC=1 SCAR=0.0
Pod documented
17  
18 22 1;
19  
20 __END__
21  
22 =pod
23  
24 =head1 NAME
25  
26 Git::Database::Actor - An actor in Git::Database
27  
28 =head1 VERSION
29  
30 version 0.012
31  
32 =head1 SYNOPSIS
33  
34 use Git::Database::Actor;
35  
36 my $actor = Git::Database::Actor->new(
37 name => 'Philippe Bruhat (BooK)',
38 email => 'book@cpan.org'
39 );
40  
41 print $actor->ident; # Philippe Bruhat (BooK) <book@cpan.org>
42  
43 =head1 DESCRIPTION
44  
45 L<Git::Database::Actor> represents a user in L<Git::Database>,
46 i.e. the combination of a name and an email.
47  
48 =head1 ATTRIBUTES
49  
50 =head2 name
51  
52 The name of the actor.
53  
54 =head2 email
55  
56 The email of the actor.
57  
58 =head1 METHODS
59  
60 =head2 ident
61  
62 The identity of the actor, build as:
63  
64 Name <email>
65  
66 =head1 AUTHOR
67  
68 Philippe Bruhat (BooK) <book@cpan.org>.
69  
70 =head1 COPYRIGHT
71  
72 Copyright 2013-2016 Philippe Bruhat (BooK), all rights reserved.
73  
74 =head1 LICENSE
75  
76 This program is free software; you can redistribute it and/or modify it
77 under the same terms as Perl itself.
78  
79 =cut
« Database/Role/RefReader.pm ↑ Summary Database/Backend/Cogit.pm »