lib/Tweet/ToDelicious/Entity/OnEvent.pm

filter: Statementstmt 100% 25 / 25 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 12 / 12 Podpod 0.0% 0 / 7 totaltotal 82.6% 38 / 46 CC 2 SCAR 1.6
CC
2
Cov
96%
is_favorite
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« lib/Tweet/ToDelicious/Entity.pm ↑ Summary lib/Tweet/ToDelicious.pm »
1 package Tweet::ToDelicious::Entity::OnEvent;
2  
3 15 ▶use v5.14;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 15 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 15 ▶use parent 'Tweet::ToDelicious::Entity::Interface';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 15 ▶use Class::Accessor::Lite ( new => 1 );
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 15 ▶use constant STATUS_FORMAT => 'https://twitter.com/#!/%s/status/%s';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶sub screen_name { $_[0]->{source}->{screen_name} }
Subroutine screen_name: called CC=1 SCAR=0.0
Pod undocumented
11 2 ▶sub text { $_[0]->{target_object}->{text} }
Subroutine text: called CC=1 SCAR=0.0
Pod undocumented
12 1 ▶sub is_favorite { $_[0]->{event} && $_[0]->{event} eq 'favorite' }
Subroutine is_favorite: called CC=2 SCAR=7.6
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
$_[0]{"event"} and $_[0]{"event"} eq "favorite" 1 0 1
13 2 ▶sub tags {qw/favorite via:tweet2delicious/}
Subroutine tags: called CC=1 SCAR=0.0
Pod undocumented
14  
15 1 ▶sub in_reply_to_screen_name {
Subroutine in_reply_to_screen_name: called CC=1 SCAR=0.0
Pod undocumented
16 1 $_[0]->{target_object}->{in_reply_to_screen_name};
17 }
18  
19 2 ▶sub urls {
Subroutine urls: called CC=1 SCAR=0.0
Pod undocumented
20 2 my $self = shift;
21 sprintf STATUS_FORMAT, $self->{target_object}->{user}->{screen_name},
22 2 $self->{target_object}->{id_str};
23 }
24  
25 1 ▶sub posts {
Subroutine posts: called CC=1 SCAR=0.0
Pod undocumented
26 1 my $self = shift;
27 1 my ($url) = $self->urls;
28 return {
29 1 url => $url,
30 tags => join( ',', $self->tags ),
31 description => $self->text,
32 replace => 1,
33 };
34 }
35 15 1;
« lib/Tweet/ToDelicious/Entity.pm ↑ Summary lib/Tweet/ToDelicious.pm »