| 1 | package Net::LiveJournal::Entry; | ||||||||||||||||||||||||||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use Carp qw(croak); | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||
| 6 | 0 | ▶ | sub new { | ||||||||||||||||||||||||||||||||
|
Subroutine
new: not called CC=8 SCAR=42.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 7 | 0 | my ($class, %opts) = @_; | |||||||||||||||||||||||||||||||||
| 8 | 0 | my $self = bless {}, $class; | |||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||
| 10 | 0 | ▶ | $self->{body} = delete $opts{body} || delete $opts{event}; | ||||||||||||||||||||||||||||||||
|
Condition0%0/3
delete $opts{'body'} || delete $opts{'event'}
MC/DC0%0/2
delete $opts{'body'} || delete $opts{'event'}
delete $opts{'body'}
delete $opts{'event'}
Truth table0%0/3
A || B
A= delete $opts{'body'}B= delete $opts{'event'}
| |||||||||||||||||||||||||||||||||||
| 11 | 0 | ▶ | $self->{subject} = delete $opts{subject} || ""; | ||||||||||||||||||||||||||||||||
|
Condition0%0/2
delete $opts{'subject'} || ''
MC/DC0%0/1
delete $opts{'subject'} || ''
delete $opts{'subject'}
Truth table0%0/2
A
A= delete $opts{'subject'}
| |||||||||||||||||||||||||||||||||||
| 12 | 0 | ▶ | $self->{security} = delete $opts{security} || "public"; | ||||||||||||||||||||||||||||||||
|
Condition0%0/2
delete $opts{'security'} || 'public'
MC/DC0%0/1
delete $opts{'security'} || 'public'
delete $opts{'security'}
Truth table0%0/2
A
A= delete $opts{'security'}
| |||||||||||||||||||||||||||||||||||
| 13 | 0 | ▶ | $self->{allowmask} = delete $opts{allowmask} || 0; | ||||||||||||||||||||||||||||||||
|
Condition0%0/2
delete $opts{'allowmask'} || 0
MC/DC0%0/1
delete $opts{'allowmask'} || 0
delete $opts{'allowmask'}
Truth table0%0/2
A
A= delete $opts{'allowmask'}
| |||||||||||||||||||||||||||||||||||
| 14 | 0 | ▶ | $self->{usejournal} = delete $opts{usejournal} || delete $opts{community} || delete $opts{journal}; | ||||||||||||||||||||||||||||||||
|
Condition0%0/6
delete $opts{'usejournal'} || delete $opts{'community'} || delete $opts{'journal'}
delete $opts{"usejournal"} or delete $opts{"community"}
MC/DC0%0/3
delete $opts{'usejournal'} || delete $opts{'community'} || delete $opts{'journal'}
delete $opts{"usejournal"}
delete $opts{"community"}
delete $opts{'journal'}
Truth table0%0/4
A or B || C
A= delete $opts{"usejournal"}B= delete $opts{"community"}C= delete $opts{'journal'}
| |||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||
| 16 | 0 | my @now = localtime(); | |||||||||||||||||||||||||||||||||
| 17 | 0 | $self->{year} = $now[5]+1900; | |||||||||||||||||||||||||||||||||
| 18 | 0 | $self->{mon} = $now[4]+1; | |||||||||||||||||||||||||||||||||
| 19 | 0 | $self->{day} = $now[3]; | |||||||||||||||||||||||||||||||||
| 20 | 0 | $self->{hour} = $now[2]; | |||||||||||||||||||||||||||||||||
| 21 | 0 | $self->{min} = $now[1]; | |||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||
| 23 | 0 | ▶ | croak("Unknown options: " . join(", ", %opts)) if %opts; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 24 | 0 | return $self; | |||||||||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||
| 27 | 0 | ▶ | sub year { $_[0]{year} } | ||||||||||||||||||||||||||||||||
|
Subroutine
year: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 28 | 0 | ▶ | sub month { $_[0]{mon} } | ||||||||||||||||||||||||||||||||
|
Subroutine
month: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 29 | 0 | ▶ | sub mon { $_[0]{mon} } | ||||||||||||||||||||||||||||||||
|
Subroutine
mon: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 30 | 0 | ▶ | sub day { $_[0]{day} } | ||||||||||||||||||||||||||||||||
|
Subroutine
day: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 31 | 0 | ▶ | sub hour { $_[0]{hour} } | ||||||||||||||||||||||||||||||||
|
Subroutine
hour: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 32 | 0 | ▶ | sub min { $_[0]{min} } | ||||||||||||||||||||||||||||||||
|
Subroutine
min: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 33 | 0 | ▶ | sub minute { $_[0]{min} } | ||||||||||||||||||||||||||||||||
|
Subroutine
minute: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||
| 35 | 0 | ▶ | sub body { $_[0]{body} } | ||||||||||||||||||||||||||||||||
|
Subroutine
body: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 36 | 0 | ▶ | sub subject { $_[0]{subject} } | ||||||||||||||||||||||||||||||||
|
Subroutine
subject: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 37 | 0 | ▶ | sub allowmask { $_[0]{allowmask} } | ||||||||||||||||||||||||||||||||
|
Subroutine
allowmask: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 38 | 0 | ▶ | sub security { $_[0]{security} } | ||||||||||||||||||||||||||||||||
|
Subroutine
security: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||||||||
| 40 | 0 | ▶ | sub usejournal { $_[0]{usejournal} } | ||||||||||||||||||||||||||||||||
|
Subroutine
usejournal: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 41 | 0 | ▶ | sub journal { $_[0]{usejournal} } | ||||||||||||||||||||||||||||||||
|
Subroutine
journal: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||
| 43 | 1 | 1; | |||||||||||||||||||||||||||||||||