| 1 | package Reddit::Client::MoreComments; | ||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||
| 3 | 5 | ▶ | use strict; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 4 | 5 | ▶ | use warnings; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 5 | 5 | ▶ | use Carp; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||
| 7 | 5 | require Reddit::Client::Thing; | |||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||
| 9 | 5 | ▶ | use base qw/Reddit::Client::Thing/; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 10 | 5 | ▶ | use fields qw/ | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 11 | children count depth parent_id link_id | ||||||||||||||||||||||||
| 12 | 5 | /; | |||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||
| 14 | 5 | ▶ | use constant type => "more"; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||
| 16 | 0 | ▶ | sub get_collapsed_comments { | ||||||||||||||||||||||
|
Subroutine
get_collapsed_comments: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||||||||||||||||
| 17 | 0 | my ($this, %param) = @_; | |||||||||||||||||||||||
| 18 | 0 | ▶ | my $linkid = $this->{link_id} || $param{link_id} || undef; | ||||||||||||||||||||||
|
Condition0%0/5
$this->{'link_id'} || $param{'link_id'} || undef
$this->{"link_id"} or $param{"link_id"}
MC/DC0%0/2
$this->{'link_id'} || $param{'link_id'} || undef
$this->{"link_id"}
$param{"link_id"}
Truth table0%0/3
A or B
A= $this->{"link_id"}B= $param{"link_id"}
| |||||||||||||||||||||||||
| 19 | 0 | ▶ | print "MoreComments::get_collapsed_comments: link_id is required. Normally this should populate on its own. It being undefined could be the sign of an issue elsewhere. You can set it manually by passing in a link_id." unless $linkid; | ||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||
| 20 | 0 | ▶ | return unless $linkid; | ||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||
| 22 | my %data = ( | ||||||||||||||||||||||||
| 23 | link_id => $linkid, | ||||||||||||||||||||||||
| 24 | children=> $this->{children}, | ||||||||||||||||||||||||
| 25 | 0 | ); | |||||||||||||||||||||||
| 26 | 0 | ▶ | $data{sort} = $param{sort} if $param{sort}; | ||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||
| 27 | 0 | ▶ | $data{id} = $param{id} if $param{id}; | ||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||
| 29 | 0 | return $this->{session}->get_collapsed_comments( %data ); | |||||||||||||||||||||||
| 30 | } | ||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||
| 32 | 5 | 1; | |||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||
| 34 | __END__ | ||||||||||||||||||||||||