POE/Component/Server/Twirc/State.pm

filter: Statementstmt 82.6% 19 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod n/a totaltotal 75.8% 22 / 29 CC 1 SCAR 4.1
CC
1
Cov
83%
__ANON__
2.0
__ANON__
2.0
__ANON__
2.0
CRAP 1.5
« App/Twirc/Plugin/SecondaryAccount.pm ↑ Summary App/Twirc/Plugin/BangCommands.pm »
1 package POE::Component::Server::Twirc::State;
2 2 $POE::Component::Server::Twirc::State::VERSION = '0.20';
3 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use MooseX::Storage;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 with Storage(format => 'JSON', io => 'File');
7  
8 2 has access_token => isa => 'Str', is => 'rw';
9 2 has access_token_secret => isa => 'Str', is => 'rw';
10  
11 has twitter_users => (
12 isa => 'HashRef',
13 0 ▶ default => sub { {} },
Subroutine __ANON__: not called CC=1 SCAR=6.9
14 2 traits => [qw/Hash/],
15 handles => {
16 set_user_by_id => 'set',
17 get_user_by_id => 'get',
18 delete_user_by_id => 'delete',
19 get_users => 'values',
20 },
21 );
22  
23 has followers => (
24 isa => 'HashRef',
25 traits => [ qw/Hash/ ],
26 is => 'rw',
27 0 ▶ default => sub { {} },
Subroutine __ANON__: not called CC=1 SCAR=6.9
28 2 handles => {
29 add_follower_id => 'set',
30 remove_follower_id => 'delete',
31 is_follower_id => 'exists',
32 },
33 );
34  
35 0 ▶around add_follower_id => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
36 0 my ( $orig, $self, $id ) = @_;
37  
38 0 $self->$orig($id, undef);
39 2 };
40  
41 2 has followers_updated_at => is => 'rw', isa => 'Int', default => 0;
42  
43 2 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
44  
45 2 __PACKAGE__->meta->make_immutable;
46  
47 2 1;
« App/Twirc/Plugin/SecondaryAccount.pm ↑ Summary App/Twirc/Plugin/BangCommands.pm »