File Coverage

blib/lib/Bot/Backbone/Identity.pm
Criterion Covered Total %
statement 5 5 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 7 7 100.0


line stmt bran cond sub pod time code
1             package Bot::Backbone::Identity;
2             $Bot::Backbone::Identity::VERSION = '0.160630';
3 4     4   12563 use v5.10;
  4         8  
4 4     4   14 use Moose;
  4         4  
  4         21  
5              
6             # ABSTRACT: Describes an account sending or receiving a message
7              
8              
9             has username => (
10                 is => 'rw',
11                 isa => 'Str',
12                 required => 1,
13             );
14              
15              
16             has nickname => (
17                 is => 'rw',
18                 isa => 'Str',
19                 predicate => 'has_nickname',
20             );
21              
22              
23             has me => (
24                 isa => 'Bool',
25                 accessor => 'is_me',
26                 required => 1,
27                 default => 0,
28             );
29              
30              
31             __PACKAGE__->meta->make_immutable;
32              
33             __END__
34            
35             =pod
36            
37             =encoding UTF-8
38            
39             =head1 NAME
40            
41             Bot::Backbone::Identity - Describes an account sending or receiving a message
42            
43             =head1 VERSION
44            
45             version 0.160630
46            
47             =head1 SYNOPSIS
48            
49             my $account = Bot::Backbone::Identity->new(
50             username => $username,
51             nickname => $nickname,
52             );
53            
54             =head1 DESCRIPTION
55            
56             Holds username and display name information for a chat account.
57            
58             =head1 ATTRIBUTES
59            
60             =head2 username
61            
62             This is the protocol specific username.
63            
64             =head2 nickname
65            
66             This is the display name for the account.
67            
68             =head2 me
69            
70             This is a boolean value that should be set to true if this identity identifies the robot itself.
71            
72             And, by the way, the accessor for this is named C<is_me>.
73            
74             =head1 AUTHOR
75            
76             Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
77            
78             =head1 COPYRIGHT AND LICENSE
79            
80             This software is copyright (c) 2016 by Qubling Software LLC.
81            
82             This is free software; you can redistribute it and/or modify it under
83             the same terms as the Perl 5 programming language system itself.
84            
85             =cut
86